aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Walbran <qwandor@google.com>2023-11-16 09:22:58 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-11-16 09:22:58 +0000
commitf7554bb7c14986bdb415eb06c52b641d5a9e655f (patch)
treece72eb4e34f218410325637bbb3418909d093019
parentbeb13991c57bd4dac0c59c9c6c9b0207964d2627 (diff)
parent53da75d5b99477fe08634012541dec8f3030d1df (diff)
downloadno-panic-f7554bb7c14986bdb415eb06c52b641d5a9e655f.tar.gz
Upgrade no-panic to 0.1.26 am: 749d3912bb am: 53da75d5b9
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/no-panic/+/2830270 Change-Id: I985e765bb08c990d2333d4de2e5dd952dcd8ee68 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--.clippy.toml1
-rw-r--r--.github/workflows/ci.yml18
-rw-r--r--Android.bp4
-rw-r--r--Cargo.toml23
-rw-r--r--Cargo.toml.orig23
-rw-r--r--METADATA10
-rw-r--r--README.md2
-rw-r--r--patches/syn-2.diff14
-rw-r--r--src/lib.rs10
10 files changed, 55 insertions, 52 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 341a73b..6c24eb8 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,6 +1,6 @@
{
"git": {
- "sha1": "b5c6d7e1df7e423a9543ee9317f63339660743a6"
+ "sha1": "146c58feff56d594412563b95ff1221b7ae5474d"
},
"path_in_vcs": ""
} \ No newline at end of file
diff --git a/.clippy.toml b/.clippy.toml
deleted file mode 100644
index 3d30690..0000000
--- a/.clippy.toml
+++ /dev/null
@@ -1 +0,0 @@
-msrv = "1.31.0"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 650b0e7..db5726a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- rust: [nightly, beta, stable, 1.56.0]
+ rust: [nightly, beta, stable, 1.63.0]
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
@@ -61,16 +61,28 @@ jobs:
- run: cargo test
msrv:
- name: Rust 1.31.0
+ name: Rust 1.56.0
needs: pre_ci
if: needs.pre_ci.outputs.continue
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- - uses: dtolnay/rust-toolchain@1.31.0
+ - uses: dtolnay/rust-toolchain@1.56.0
- run: cargo build
+ minimal:
+ name: Minimal versions
+ needs: pre_ci
+ if: needs.pre_ci.outputs.continue
+ runs-on: ubuntu-latest
+ timeout-minutes: 45
+ steps:
+ - uses: actions/checkout@v3
+ - uses: dtolnay/rust-toolchain@nightly
+ - run: cargo generate-lockfile -Z minimal-versions
+ - run: cargo check --locked
+
clippy:
name: Clippy
runs-on: ubuntu-latest
diff --git a/Android.bp b/Android.bp
index ff229de..baccb1a 100644
--- a/Android.bp
+++ b/Android.bp
@@ -41,9 +41,9 @@ rust_proc_macro {
name: "libno_panic",
crate_name: "no_panic",
cargo_env_compat: true,
- cargo_pkg_version: "0.1.21",
+ cargo_pkg_version: "0.1.26",
srcs: ["src/lib.rs"],
- edition: "2018",
+ edition: "2021",
rustlibs: [
"libproc_macro2",
"libquote",
diff --git a/Cargo.toml b/Cargo.toml
index a183443..9422901 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,39 +10,44 @@
# See Cargo.toml.orig for the original contents.
[package]
-edition = "2018"
-rust-version = "1.31"
+edition = "2021"
+rust-version = "1.56"
name = "no-panic"
-version = "0.1.21"
+version = "0.1.26"
authors = ["David Tolnay <dtolnay@gmail.com>"]
description = "Attribute macro to require that the compiler prove a function can't ever panic."
documentation = "https://docs.rs/no-panic"
readme = "README.md"
+categories = [
+ "no-std",
+ "no-std::no-alloc",
+]
license = "MIT OR Apache-2.0"
repository = "https://github.com/dtolnay/no-panic"
[package.metadata.docs.rs]
+rustdoc-args = ["--generate-link-to-definition"]
targets = ["x86_64-unknown-linux-gnu"]
[lib]
proc-macro = true
[dependencies.proc-macro2]
-version = "1.0"
+version = "1.0.63"
[dependencies.quote]
-version = "1.0"
+version = "1.0.29"
[dependencies.syn]
-version = "1.0"
+version = "2.0.23"
features = ["full"]
[dev-dependencies.rustversion]
-version = "1.0.9"
+version = "1.0.13"
[dev-dependencies.tempfile]
-version = "3.0"
+version = "3.6"
[dev-dependencies.trybuild]
-version = "1.0.69"
+version = "1.0.81"
features = ["diff"]
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 98bf79c..8ac7ac8 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,26 +1,31 @@
[package]
name = "no-panic"
-version = "0.1.21"
+version = "0.1.26"
authors = ["David Tolnay <dtolnay@gmail.com>"]
+categories = ["no-std", "no-std::no-alloc"]
description = "Attribute macro to require that the compiler prove a function can't ever panic."
documentation = "https://docs.rs/no-panic"
-edition = "2018"
+edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/dtolnay/no-panic"
-rust-version = "1.31"
+rust-version = "1.56"
[lib]
proc-macro = true
[dependencies]
-proc-macro2 = "1.0"
-quote = "1.0"
-syn = { version = "1.0", features = ["full"] }
+proc-macro2 = "1.0.63"
+quote = "1.0.29"
+syn = { version = "2.0.23", features = ["full"] }
[dev-dependencies]
-rustversion = "1.0.9"
-tempfile = "3.0"
-trybuild = { version = "1.0.69", features = ["diff"] }
+rustversion = "1.0.13"
+tempfile = "3.6"
+trybuild = { version = "1.0.81", features = ["diff"] }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
+rustdoc-args = ["--generate-link-to-definition"]
+
+[workspace]
+members = ["noexcept", "noexcept-impl"]
diff --git a/METADATA b/METADATA
index 18ed219..62031ac 100644
--- a/METADATA
+++ b/METADATA
@@ -1,6 +1,6 @@
# This project was upgraded with external_updater.
# Usage: tools/external_updater/updater.sh update rust/crates/no-panic
-# For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md
+# For more info, check https://cs.android.com/android/platform/superproject/+/main:tools/external_updater/README.md
name: "no-panic"
description: "Attribute macro to require that the compiler prove a function can\'t ever panic."
@@ -11,13 +11,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/no-panic/no-panic-0.1.21.crate"
+ value: "https://static.crates.io/crates/no-panic/no-panic-0.1.26.crate"
}
- version: "0.1.21"
+ version: "0.1.26"
license_type: NOTICE
last_upgrade_date {
year: 2023
- month: 3
- day: 6
+ month: 11
+ day: 14
}
}
diff --git a/README.md b/README.md
index 33dc3cd..e81e6f0 100644
--- a/README.md
+++ b/README.md
@@ -58,8 +58,6 @@ _panic_demo..demo..__NoPanic$u20$as$u20$core..ops..drop..Drop$GT$4drop17h72f8f42
The error is not stellar but notice the ERROR\[no-panic\] part at the end that
provides the name of the offending function.
-*Compiler support: requires rustc 1.31+*
-
<br>
### Caveats
diff --git a/patches/syn-2.diff b/patches/syn-2.diff
deleted file mode 100644
index f552d50..0000000
--- a/patches/syn-2.diff
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/src/lib.rs b/src/lib.rs
-index d0be8b4..4b9981e 100644
---- a/src/lib.rs
-+++ b/src/lib.rs
-@@ -239,8 +239,7 @@ fn expand_no_panic(mut function: ItemFn) -> TokenStream2 {
- let has_inline = function
- .attrs
- .iter()
-- .flat_map(Attribute::parse_meta)
-- .any(|meta| meta.path().is_ident("inline"));
-+ .any(|attr| attr.meta.path().is_ident("inline"));
- if !has_inline {
- function.attrs.push(parse_quote!(#[inline]));
- }
diff --git a/src/lib.rs b/src/lib.rs
index 4b9981e..e8b609f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -66,8 +66,6 @@
//! The error is not stellar but notice the ERROR\[no-panic\] part at the end
//! that provides the name of the offending function.
//!
-//! *Compiler support: requires rustc 1.31+*
-//!
//! <br>
//!
//! ## Caveats
@@ -119,7 +117,7 @@
//! [Kixunil]: https://github.com/Kixunil
//! [`dont_panic`]: https://github.com/Kixunil/dont_panic
-#![doc(html_root_url = "https://docs.rs/no-panic/0.1.21")]
+#![doc(html_root_url = "https://docs.rs/no-panic/0.1.26")]
#![allow(
clippy::doc_markdown,
clippy::match_same_arms,
@@ -134,8 +132,8 @@ use proc_macro2::{Span, TokenStream as TokenStream2};
use quote::quote;
use syn::parse::{Error, Nothing, Result};
use syn::{
- parse_quote, Attribute, FnArg, GenericArgument, Ident, ItemFn, Pat, PatType, Path,
- PathArguments, ReturnType, Token, Type, TypeInfer, TypeParamBound,
+ parse_quote, FnArg, GenericArgument, Ident, ItemFn, Pat, PatType, Path, PathArguments,
+ ReturnType, Token, Type, TypeInfer, TypeParamBound,
};
#[proc_macro_attribute]
@@ -239,7 +237,7 @@ fn expand_no_panic(mut function: ItemFn) -> TokenStream2 {
let has_inline = function
.attrs
.iter()
- .any(|attr| attr.meta.path().is_ident("inline"));
+ .any(|attr| attr.path().is_ident("inline"));
if !has_inline {
function.attrs.push(parse_quote!(#[inline]));
}