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;
3
3
use crate :: ident:: Ident ;
4
4
use crate :: punctuated:: { self , Punctuated } ;
5
5
use crate :: restriction:: { FieldMutability , Visibility } ;
6
- use crate :: spanned:: Spanned ;
7
6
use crate :: token;
8
7
use crate :: ty:: Type ;
9
8
@@ -145,7 +144,13 @@ mod iter_member {
145
144
None => {
146
145
let m = Member :: Unnamed ( crate :: Index {
147
146
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
+ } ,
149
154
} ) ;
150
155
self . unnamed_counter += 1 ;
151
156
Some ( m)
You can’t perform that action at this time.
0 commit comments