File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -330,6 +330,16 @@ pub fn stream_to_parser(sess: &ParseSess, stream: TokenStream) -> Parser<'_> {
330330}
331331
332332/// Given stream, the `ParseSess` and the base directory, produces a parser.
333+ ///
334+ /// Use this function when you are creating a parser from the token stream
335+ /// and also care about the current working directory of the parser (e.g.,
336+ /// you are trying to resolve modules defined inside a macro invocation).
337+ ///
338+ /// # Note
339+ ///
340+ /// The main usage of this function is outside of rustc, for those who uses
341+ /// libsyntax as a library. Please do not remove this function while refactoring
342+ /// just because it is not used in rustc codebase!
333343pub fn stream_to_parser_with_base_dir < ' a > ( sess : & ' a ParseSess ,
334344 stream : TokenStream ,
335345 base_dir : Directory < ' a > ) -> Parser < ' a > {
You can’t perform that action at this time.
0 commit comments