File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1130,7 +1130,7 @@ impl MetaItemKind {
1130
1130
let mut result = Vec :: new ( ) ;
1131
1131
while let Some ( ..) = tokens. peek ( ) {
1132
1132
match NestedMetaItemKind :: from_tokens ( & mut tokens) {
1133
- Some ( item) => result. push ( Spanned { span : item. span ( ) , node : item } ) ,
1133
+ Some ( item) => result. push ( respan ( item. span ( ) , item) ) ,
1134
1134
None => return None ,
1135
1135
}
1136
1136
match tokens. next ( ) {
@@ -1163,7 +1163,7 @@ impl NestedMetaItemKind {
1163
1163
if let Some ( TokenTree :: Token ( span, token) ) = tokens. peek ( ) . cloned ( ) {
1164
1164
if let Some ( node) = LitKind :: from_token ( token) {
1165
1165
tokens. next ( ) ;
1166
- return Some ( NestedMetaItemKind :: Literal ( Spanned { node : node , span : span } ) ) ;
1166
+ return Some ( NestedMetaItemKind :: Literal ( respan ( span , node ) ) ) ;
1167
1167
}
1168
1168
}
1169
1169
@@ -1256,7 +1256,7 @@ pub trait HasAttrs: Sized {
1256
1256
impl < T : HasAttrs > HasAttrs for Spanned < T > {
1257
1257
fn attrs ( & self ) -> & [ ast:: Attribute ] { self . node . attrs ( ) }
1258
1258
fn map_attrs < F : FnOnce ( Vec < ast:: Attribute > ) -> Vec < ast:: Attribute > > ( self , f : F ) -> Self {
1259
- Spanned { node : self . node . map_attrs ( f) , span : self . span }
1259
+ respan ( self . span , self . node . map_attrs ( f) )
1260
1260
}
1261
1261
}
1262
1262
You can’t perform that action at this time.
0 commit comments