diff options
author | Matthew Maurer <mmaurer@google.com> | 2023-05-26 23:48:43 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-05-26 23:48:43 +0000 |
commit | 056f741969352f89d34c46dd0f601d0978709355 (patch) | |
tree | 01931800f0a194d0b8da3f3a78b3cc86649ce23c | |
parent | bce9359d2003d948ebc9232f27f4ca229f169b60 (diff) | |
parent | 702ecef358d8d9a966dc97824f29f1452a436d9b (diff) | |
download | derive-getters-056f741969352f89d34c46dd0f601d0978709355.tar.gz |
Update to syn-2 am: 94473dc12e am: 26e1006f3b am: 702ecef358
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/derive-getters/+/2523658
Change-Id: I48774241899b3fbca04978362b95f8aec849291e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | patches/syn-2.diff | 35 | ||||
-rw-r--r-- | src/dissolve.rs | 4 | ||||
-rw-r--r-- | src/getters.rs | 2 |
3 files changed, 38 insertions, 3 deletions
diff --git a/patches/syn-2.diff b/patches/syn-2.diff new file mode 100644 index 0000000..46fec69 --- /dev/null +++ b/patches/syn-2.diff @@ -0,0 +1,35 @@ +diff --git a/src/dissolve.rs b/src/dissolve.rs +index 69feb0f..d63ffa0 100644 +--- a/src/dissolve.rs ++++ b/src/dissolve.rs +@@ -82,7 +82,7 @@ fn dissolve_rename_from(attributes: &[Attribute]) -> Result<Option<Ident>> { + for attr in attributes { + if attr.style != AttrStyle::Outer { continue; } + +- if attr.path.is_ident("dissolve") { ++ if attr.path().is_ident("dissolve") { + let rename = attr.parse_args::<Rename>()?; + current = Some(rename.name); + } +@@ -112,7 +112,7 @@ impl<'a> NamedStruct<'a> { + }); + + let type_tuple = TypeTuple { +- paren_token: Paren { span: Span::call_site() }, ++ paren_token: Default::default(), + elems: types, + }; + +diff --git a/src/getters.rs b/src/getters.rs +index 211b646..b37c953 100644 +--- a/src/getters.rs ++++ b/src/getters.rs +@@ -60,7 +60,7 @@ fn get_action_from(attributes: &[Attribute]) -> Result<Option<Action>> { + for attr in attributes { + if attr.style != AttrStyle::Outer { continue; } + +- if attr.path.is_ident("getter") { ++ if attr.path().is_ident("getter") { + current = Some(attr.parse_args::<Action>()?); + } + } diff --git a/src/dissolve.rs b/src/dissolve.rs index 69feb0f..d63ffa0 100644 --- a/src/dissolve.rs +++ b/src/dissolve.rs @@ -82,7 +82,7 @@ fn dissolve_rename_from(attributes: &[Attribute]) -> Result<Option<Ident>> { for attr in attributes { if attr.style != AttrStyle::Outer { continue; } - if attr.path.is_ident("dissolve") { + if attr.path().is_ident("dissolve") { let rename = attr.parse_args::<Rename>()?; current = Some(rename.name); } @@ -112,7 +112,7 @@ impl<'a> NamedStruct<'a> { }); let type_tuple = TypeTuple { - paren_token: Paren { span: Span::call_site() }, + paren_token: Default::default(), elems: types, }; diff --git a/src/getters.rs b/src/getters.rs index 211b646..b37c953 100644 --- a/src/getters.rs +++ b/src/getters.rs @@ -60,7 +60,7 @@ fn get_action_from(attributes: &[Attribute]) -> Result<Option<Action>> { for attr in attributes { if attr.style != AttrStyle::Outer { continue; } - if attr.path.is_ident("getter") { + if attr.path().is_ident("getter") { current = Some(attr.parse_args::<Action>()?); } } |