Skip to content

Commit 2309625

Browse files
committed
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.
1 parent e1b8898 commit 2309625

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libsyntax/parse/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ pub fn maybe_new_parser_from_file<'a>(sess: &'a ParseSess, path: &Path)
185185
/// Given a session, a crate config, a path, and a span, add
186186
/// the file at the given path to the source_map, and return a parser.
187187
/// On an error, use the given span as the source of the problem.
188-
crate fn new_sub_parser_from_file<'a>(sess: &'a ParseSess,
188+
pub fn new_sub_parser_from_file<'a>(sess: &'a ParseSess,
189189
path: &Path,
190190
directory_ownership: DirectoryOwnership,
191191
module_name: Option<String>,

0 commit comments

Comments
 (0)