diff options
author | Matthew Maurer <mmaurer@google.com> | 2023-04-04 23:42:06 +0000 |
---|---|---|
committer | Matthew Maurer <mmaurer@google.com> | 2023-04-04 23:42:06 +0000 |
commit | ace13297f33bdbbe00078f2e20408ac597376fd3 (patch) | |
tree | 031676919df9499055cd64b2037df1f547c43208 | |
parent | 104aad1bd350d5ef621c66b85c3966df2223a880 (diff) | |
download | no-panic-ace13297f33bdbbe00078f2e20408ac597376fd3.tar.gz |
Update to syn-2
Bug: 276463929
Test: mm
Change-Id: Ie8ebb9cb5559a06098fa56c9e216d7ea2aff3744
-rw-r--r-- | patches/syn-2.diff | 14 | ||||
-rw-r--r-- | src/lib.rs | 3 |
2 files changed, 15 insertions, 2 deletions
diff --git a/patches/syn-2.diff b/patches/syn-2.diff new file mode 100644 index 0000000..f552d50 --- /dev/null +++ b/patches/syn-2.diff @@ -0,0 +1,14 @@ +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])); + } @@ -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])); } |