File tree Expand file tree Collapse file tree 2 files changed +2
-17
lines changed Expand file tree Collapse file tree 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>(
258258 trace_macros_note ( & mut cx. expansions , sp, msg) ;
259259 }
260260
261- let mut p = Parser :: new ( cx . parse_sess ( ) , tts, false , None ) ;
261+ let mut p = Parser :: new ( sess , tts, false , None ) ;
262262 p. root_module_name =
263263 cx. current_expansion . module . mod_path . last ( ) . map ( |id| id. to_string ( ) ) ;
264264 p. last_type_ascription = cx. current_expansion . prior_type_ascription ;
@@ -1204,7 +1204,7 @@ fn quoted_tt_to_string(tt: &mbe::TokenTree) -> String {
12041204 }
12051205}
12061206
1207- fn parser_from_cx < ' cx > ( sess : & ' cx ParseSess , tts : TokenStream ) -> Parser < ' cx > {
1207+ fn parser_from_cx ( sess : & ParseSess , tts : TokenStream ) -> Parser < ' _ > {
12081208 Parser :: new ( sess, tts, true , rustc_parse:: MACRO_ARGUMENTS )
12091209}
12101210
Original file line number Diff line number Diff line change @@ -237,21 +237,6 @@ pub fn stream_to_parser<'a>(
237237 Parser :: new ( sess, stream, false , subparser_name)
238238}
239239
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-
255240/// Runs the given subparser `f` on the tokens of the given `attr`'s item.
256241pub fn parse_in < ' a , T > (
257242 sess : & ' a ParseSess ,
You can’t perform that action at this time.
0 commit comments