File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ use crate::expr::Expr;
33use crate :: ident:: Ident ;
44use crate :: punctuated:: { self , Punctuated } ;
55use crate :: restriction:: { FieldMutability , Visibility } ;
6- use crate :: spanned:: Spanned ;
76use crate :: token;
87use crate :: ty:: Type ;
98
@@ -145,7 +144,13 @@ mod iter_member {
145144 None => {
146145 let m = Member :: Unnamed ( crate :: Index {
147146 index : self . unnamed_counter ,
148- span : field. ty . span ( ) ,
147+ span : {
148+ #[ cfg( all( feature = "parsing" , feature = "printing" ) ) ]
149+ let span = crate :: spanned:: Spanned :: span ( & field. ty ) ;
150+ #[ cfg( not( all( feature = "parsing" , feature = "printing" ) ) ) ]
151+ let span = proc_macro2:: Span :: call_site ( ) ;
152+ span
153+ } ,
149154 } ) ;
150155 self . unnamed_counter += 1 ;
151156 Some ( m)
You can’t perform that action at this time.
0 commit comments