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 @@ -238,21 +238,6 @@ pub fn stream_to_parser<'a>(
238238 Parser :: new ( sess, stream, false , subparser_name)
239239}
240240
241- /// Given a stream, the `ParseSess` and the base directory, produces a parser.
242- ///
243- /// Use this function when you are creating a parser from the token stream
244- /// and also care about the current working directory of the parser (e.g.,
245- /// you are trying to resolve modules defined inside a macro invocation).
246- ///
247- /// # Note
248- ///
249- /// The main usage of this function is outside of rustc, for those who uses
250- /// librustc_ast as a library. Please do not remove this function while refactoring
251- /// just because it is not used in rustc codebase!
252- pub fn stream_to_parser_with_base_dir ( sess : & ParseSess , stream : TokenStream ) -> Parser < ' _ > {
253- Parser :: new ( sess, stream, false , None )
254- }
255-
256241/// Runs the given subparser `f` on the tokens of the given `attr`'s item.
257242pub fn parse_in < ' a , T > (
258243 sess : & ' a ParseSess ,
You can’t perform that action at this time.
0 commit comments