blob: 13a0d054806259afe96d4d376018c839b7a90592 [file] [log] [blame]
Update some dependencies to avoid introducing older versions in Chromium OS.
This is committed upstream but not in any release yet:
https://github.com/rust-embedded/riscv-rt/commit/dfc070980bb8eda53962c41b4ba9f6d687fdb5ca
diff -ur a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml 2022-01-13 17:28:10.952825927 +1100
+++ b/Cargo.toml 2022-01-13 17:29:30.569113637 +1100
@@ -24,15 +24,16 @@
[lib]
proc-macro = true
[dependencies.proc-macro2]
-version = "0.4.20"
+version = "1.0"
[dependencies.quote]
-version = "0.6.8"
+version = "1.0"
[dependencies.rand]
-version = "0.5.5"
+version = "0.7.3"
default-features = false
+features = ["small_rng"]
[dependencies.syn]
-version = "0.15.13"
+version = "1.0"
features = ["extra-traits", "full"]
diff -ur a/src/lib.rs b/src/lib.rs
--- a/src/lib.rs 2022-01-13 17:28:10.952825927 +1100
+++ b/src/lib.rs 2022-01-13 17:28:33.724908233 +1100
@@ -58,14 +58,15 @@
let f = parse_macro_input!(input as ItemFn);
// check the function signature
- let valid_signature = f.constness.is_none()
+ let valid_signature = f.sig.constness.is_none()
+ && f.sig.asyncness.is_none()
&& f.vis == Visibility::Inherited
- && f.abi.is_none()
- && f.decl.inputs.is_empty()
- && f.decl.generics.params.is_empty()
- && f.decl.generics.where_clause.is_none()
- && f.decl.variadic.is_none()
- && match f.decl.output {
+ && f.sig.abi.is_none()
+ && f.sig.inputs.is_empty()
+ && f.sig.generics.params.is_empty()
+ && f.sig.generics.where_clause.is_none()
+ && f.sig.variadic.is_none()
+ && match f.sig.output {
ReturnType::Default => false,
ReturnType::Type(_, ref ty) => match **ty {
Type::Never(_) => true,
@@ -90,7 +91,7 @@
// XXX should we blacklist other attributes?
let attrs = f.attrs;
- let unsafety = f.unsafety;
+ let unsafety = f.sig.unsafety;
let hash = random_ident();
let stmts = f.block.stmts;
@@ -133,15 +134,16 @@
let f = parse_macro_input!(input as ItemFn);
// check the function signature
- let valid_signature = f.constness.is_none()
+ let valid_signature = f.sig.constness.is_none()
+ && f.sig.asyncness.is_none()
&& f.vis == Visibility::Inherited
- && f.unsafety.is_some()
- && f.abi.is_none()
- && f.decl.inputs.is_empty()
- && f.decl.generics.params.is_empty()
- && f.decl.generics.where_clause.is_none()
- && f.decl.variadic.is_none()
- && match f.decl.output {
+ && f.sig.unsafety.is_some()
+ && f.sig.abi.is_none()
+ && f.sig.inputs.is_empty()
+ && f.sig.generics.params.is_empty()
+ && f.sig.generics.where_clause.is_none()
+ && f.sig.variadic.is_none()
+ && match f.sig.output {
ReturnType::Default => true,
ReturnType::Type(_, ref ty) => match **ty {
Type::Tuple(ref tuple) => tuple.elems.is_empty(),
@@ -166,7 +168,7 @@
// XXX should we blacklist other attributes?
let attrs = f.attrs;
- let ident = f.ident;
+ let ident = f.sig.ident;
let block = f.block;
quote!(