File tree 2 files changed +2
-17
lines changed
2 files changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ fn generic_extension<'cx>(
258
258
trace_macros_note ( & mut cx. expansions , sp, msg) ;
259
259
}
260
260
261
- let mut p = Parser :: new ( cx . parse_sess ( ) , tts, false , None ) ;
261
+ let mut p = Parser :: new ( sess , tts, false , None ) ;
262
262
p. root_module_name =
263
263
cx. current_expansion . module . mod_path . last ( ) . map ( |id| id. to_string ( ) ) ;
264
264
p. last_type_ascription = cx. current_expansion . prior_type_ascription ;
@@ -1204,7 +1204,7 @@ fn quoted_tt_to_string(tt: &mbe::TokenTree) -> String {
1204
1204
}
1205
1205
}
1206
1206
1207
- fn parser_from_cx < ' cx > ( sess : & ' cx ParseSess , tts : TokenStream ) -> Parser < ' cx > {
1207
+ fn parser_from_cx ( sess : & ParseSess , tts : TokenStream ) -> Parser < ' _ > {
1208
1208
Parser :: new ( sess, tts, true , rustc_parse:: MACRO_ARGUMENTS )
1209
1209
}
1210
1210
Original file line number Diff line number Diff line change @@ -237,21 +237,6 @@ pub fn stream_to_parser<'a>(
237
237
Parser :: new ( sess, stream, false , subparser_name)
238
238
}
239
239
240
- /// Given a stream, the `ParseSess` and the base directory, produces a parser.
241
- ///
242
- /// Use this function when you are creating a parser from the token stream
243
- /// and also care about the current working directory of the parser (e.g.,
244
- /// you are trying to resolve modules defined inside a macro invocation).
245
- ///
246
- /// # Note
247
- ///
248
- /// The main usage of this function is outside of rustc, for those who uses
249
- /// librustc_ast as a library. Please do not remove this function while refactoring
250
- /// just because it is not used in rustc codebase!
251
- pub fn stream_to_parser_with_base_dir < ' a > ( sess : & ' a ParseSess , stream : TokenStream ) -> Parser < ' a > {
252
- Parser :: new ( sess, stream, false , None )
253
- }
254
-
255
240
/// Runs the given subparser `f` on the tokens of the given `attr`'s item.
256
241
pub fn parse_in < ' a , T > (
257
242
sess : & ' a ParseSess ,
You can’t perform that action at this time.
0 commit comments