File tree Expand file tree Collapse file tree 3 files changed +26
-14
lines changed Expand file tree Collapse file tree 3 files changed +26
-14
lines changed Original file line number Diff line number Diff line change @@ -993,7 +993,7 @@ dependencies = [
993993 " proc-macro2 0.4.30" ,
994994 " quote 0.6.12" ,
995995 " syn 0.15.35" ,
996- " synstructure" ,
996+ " synstructure 0.10.2 " ,
997997]
998998
999999[[package ]]
@@ -3165,7 +3165,7 @@ dependencies = [
31653165 " proc-macro2 0.4.30" ,
31663166 " quote 0.6.12" ,
31673167 " syn 0.15.35" ,
3168- " synstructure" ,
3168+ " synstructure 0.10.2 " ,
31693169]
31703170
31713171[[package ]]
@@ -3546,10 +3546,10 @@ name = "rustc_macros"
35463546version = " 0.1.0"
35473547dependencies = [
35483548 " itertools 0.8.0" ,
3549- " proc-macro2 0.4.30 " ,
3550- " quote 0.6.12 " ,
3551- " syn 0.15.35 " ,
3552- " synstructure" ,
3549+ " proc-macro2 1.0.3 " ,
3550+ " quote 1.0.2 " ,
3551+ " syn 1.0.5 " ,
3552+ " synstructure 0.12.1 " ,
35533553]
35543554
35553555[[package ]]
@@ -4242,6 +4242,18 @@ dependencies = [
42424242 " unicode-xid 0.1.0" ,
42434243]
42444244
4245+ [[package ]]
4246+ name = " synstructure"
4247+ version = " 0.12.1"
4248+ source = " registry+https://github.com/rust-lang/crates.io-index"
4249+ checksum = " 3f085a5855930c0441ca1288cf044ea4aecf4f43a91668abdb870b4ba546a203"
4250+ dependencies = [
4251+ " proc-macro2 1.0.3" ,
4252+ " quote 1.0.2" ,
4253+ " syn 1.0.5" ,
4254+ " unicode-xid 0.2.0" ,
4255+ ]
4256+
42454257[[package ]]
42464258name = " syntax"
42474259version = " 0.0.0"
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ edition = "2018"
88proc-macro = true
99
1010[dependencies ]
11- synstructure = " 0.10.2 "
12- syn = { version = " 0.15.22 " , features = [" full" ] }
13- proc-macro2 = " 0.4.24 "
14- quote = " 0.6.10 "
11+ synstructure = " 0.12.1 "
12+ syn = { version = " 1 " , features = [" full" ] }
13+ proc-macro2 = " 1 "
14+ quote = " 1 "
1515itertools = " 0.8"
Original file line number Diff line number Diff line change @@ -15,22 +15,22 @@ fn parse_attributes(field: &syn::Field) -> Attributes {
1515 } ;
1616 for attr in & field. attrs {
1717 if let Ok ( meta) = attr. parse_meta ( ) {
18- if & meta. name ( ) . to_string ( ) != "stable_hasher" {
18+ if ! meta. path ( ) . is_ident ( "stable_hasher" ) {
1919 continue ;
2020 }
2121 let mut any_attr = false ;
2222 if let Meta :: List ( list) = meta {
2323 for nested in list. nested . iter ( ) {
2424 if let NestedMeta :: Meta ( meta) = nested {
25- if & meta. name ( ) . to_string ( ) == "ignore" {
25+ if meta. path ( ) . is_ident ( "ignore" ) {
2626 attrs. ignore = true ;
2727 any_attr = true ;
2828 }
29- if & meta. name ( ) . to_string ( ) == "project" {
29+ if meta. path ( ) . is_ident ( "project" ) {
3030 if let Meta :: List ( list) = meta {
3131 if let Some ( nested) = list. nested . iter ( ) . next ( ) {
3232 if let NestedMeta :: Meta ( meta) = nested {
33- attrs. project = Some ( meta. name ( ) ) ;
33+ attrs. project = meta. path ( ) . get_ident ( ) . cloned ( ) ;
3434 any_attr = true ;
3535 }
3636 }
You can’t perform that action at this time.
0 commit comments