Skip to content

Commit

Permalink
Add doc comment
Browse files Browse the repository at this point in the history
  • Loading branch information
topecongiro committed May 21, 2019
1 parent e186d3f commit b07dbe1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/libsyntax/parse/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,16 @@ pub fn stream_to_parser(sess: &ParseSess, stream: TokenStream) -> Parser<'_> {
}

/// Given stream, the `ParseSess` and the base directory, produces a parser.
///
/// Use this function when you are creating a parser from the token stream
/// and also care about the current working directory of the parser (e.g.,
/// you are trying to resolve modules defined inside a macro invocation).
///
/// # Note
///
/// The main usage of this function is outside of rustc, for those who uses
/// libsyntax as a library. Please do not remove this function while refactoring
/// just because it is not used in rustc codebase!
pub fn stream_to_parser_with_base_dir<'a>(sess: &'a ParseSess,
stream: TokenStream,
base_dir: Directory<'a>) -> Parser<'a> {
Expand Down

0 comments on commit b07dbe1

Please sign in to comment.