diff options
| author | topecongiro <seuchida@gmail.com> | 2019-05-21 22:57:34 +0900 |
|---|---|---|
| committer | topecongiro <seuchida@gmail.com> | 2019-05-21 22:57:34 +0900 |
| commit | b07dbe1d44038b84e722cbe1efe3201e8fa934d8 (patch) | |
| tree | d4a21807440825082e2394b1799091e469a1a908 /src/libsyntax/parse/mod.rs | |
| parent | e186d3f3e057eef69c60c7d34e474461432ee544 (diff) | |
| download | rust-b07dbe1d44038b84e722cbe1efe3201e8fa934d8.tar.gz rust-b07dbe1d44038b84e722cbe1efe3201e8fa934d8.zip | |
Add doc comment
Diffstat (limited to 'src/libsyntax/parse/mod.rs')
| -rw-r--r-- | src/libsyntax/parse/mod.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 53d6838939d..8c1810e3efa 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -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> { |
