File tree 2 files changed +3
-5
lines changed
2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -225,10 +225,11 @@ impl LitStr {
225
225
226
226
// Parse string literal into a token stream with every span equal to the
227
227
// original literal's span.
228
+ let span = self . span ( ) ;
228
229
let mut tokens = TokenStream :: from_str ( & self . value ( ) ) ?;
229
- tokens = respan_token_stream ( tokens, self . span ( ) ) ;
230
+ tokens = respan_token_stream ( tokens, span) ;
230
231
231
- let result = parser . parse2 ( tokens) ?;
232
+ let result = crate :: parse :: parse_scoped ( parser , span , tokens) ?;
232
233
233
234
let suffix = self . suffix ( ) ;
234
235
if !suffix. is_empty ( ) {
Original file line number Diff line number Diff line change @@ -1268,7 +1268,6 @@ pub trait Parser: Sized {
1268
1268
1269
1269
// Not public API.
1270
1270
#[ doc( hidden) ]
1271
- #[ cfg( any( feature = "full" , feature = "derive" ) ) ]
1272
1271
fn __parse_scoped ( self , scope : Span , tokens : TokenStream ) -> Result < Self :: Output > {
1273
1272
let _ = scope;
1274
1273
self . parse2 ( tokens)
@@ -1300,7 +1299,6 @@ where
1300
1299
}
1301
1300
}
1302
1301
1303
- #[ cfg( any( feature = "full" , feature = "derive" ) ) ]
1304
1302
fn __parse_scoped ( self , scope : Span , tokens : TokenStream ) -> Result < Self :: Output > {
1305
1303
let buf = TokenBuffer :: new2 ( tokens) ;
1306
1304
let cursor = buf. begin ( ) ;
@@ -1316,7 +1314,6 @@ where
1316
1314
}
1317
1315
}
1318
1316
1319
- #[ cfg( any( feature = "full" , feature = "derive" ) ) ]
1320
1317
pub ( crate ) fn parse_scoped < F : Parser > ( f : F , scope : Span , tokens : TokenStream ) -> Result < F :: Output > {
1321
1318
f. __parse_scoped ( scope, tokens)
1322
1319
}
You can’t perform that action at this time.
0 commit comments