@@ -64,7 +64,7 @@ impl StructAttrs {
64
64
( $cond: expr) => {
65
65
if $cond {
66
66
let msg = format!( "duplicate '{keyword}' confique attribute" ) ;
67
- return Err ( Error :: new( attr. tokens . span( ) , msg) ) ;
67
+ return Err ( Error :: new( attr. path ( ) . span( ) , msg) ) ;
68
68
}
69
69
} ;
70
70
}
@@ -214,7 +214,7 @@ impl FieldAttrs {
214
214
( $cond: expr) => {
215
215
if $cond {
216
216
let msg = format!( "duplicate '{keyword}' confique attribute" ) ;
217
- return Err ( Error :: new( attr. tokens . span( ) , msg) ) ;
217
+ return Err ( Error :: new( attr. path ( ) . span( ) , msg) ) ;
218
218
}
219
219
} ;
220
220
}
@@ -433,9 +433,9 @@ fn parse_eq_value<T: syn::parse::Parse>(input: ParseStream) -> Result<T, Error>
433
433
/// strings (in order).
434
434
fn extract_doc ( attrs : & mut Vec < syn:: Attribute > ) -> Vec < String > {
435
435
extract_attrs ( attrs, |attr| {
436
- match attr. parse_meta ( ) . ok ( ) ? {
436
+ match & attr. meta {
437
437
syn:: Meta :: NameValue ( syn:: MetaNameValue {
438
- lit : syn:: Lit :: Str ( s) ,
438
+ value : syn :: Expr :: Lit ( syn :: ExprLit { lit : syn:: Lit :: Str ( s) , .. } ) ,
439
439
path,
440
440
..
441
441
} ) if path. is_ident ( "doc" ) => Some ( s. value ( ) ) ,
@@ -447,7 +447,7 @@ fn extract_doc(attrs: &mut Vec<syn::Attribute>) -> Vec<String> {
447
447
448
448
fn extract_config_attrs ( attrs : & mut Vec < syn:: Attribute > ) -> Vec < syn:: Attribute > {
449
449
extract_attrs ( attrs, |attr| {
450
- if attr. path . is_ident ( "config" ) {
450
+ if attr. path ( ) . is_ident ( "config" ) {
451
451
// TODO: clone not necessary once we use drain_filter
452
452
Some ( attr. clone ( ) )
453
453
} else {
0 commit comments