From 2309625941ac548c407def97eb87d03b237737cf Mon Sep 17 00:00:00 2001 From: topecongiro Date: Sat, 9 Mar 2019 21:59:54 +0900 Subject: [PATCH] Expose new_sub_parser_from_file This function is useful when external tools like rustfmt want to parse internal files without parsing a whole crate. --- src/libsyntax/parse/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 98b5fe563b8a9..371e8fe5cf66f 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -185,7 +185,7 @@ pub fn maybe_new_parser_from_file<'a>(sess: &'a ParseSess, path: &Path) /// Given a session, a crate config, a path, and a span, add /// the file at the given path to the source_map, and return a parser. /// On an error, use the given span as the source of the problem. -crate fn new_sub_parser_from_file<'a>(sess: &'a ParseSess, +pub fn new_sub_parser_from_file<'a>(sess: &'a ParseSess, path: &Path, directory_ownership: DirectoryOwnership, module_name: Option,