Rollup merge of #59045 - topecongiro:expose-new_sub_parser_from_file, r=Centril
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. cc https://github.com/rust-lang/rustfmt/issues/3427.
This commit is contained in:
commit
4eb762a0ea
1 changed files with 1 additions and 1 deletions
|
|
@ -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<String>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue