diff options
| author | Caleb Cartwright <caleb.cartwright@outlook.com> | 2020-01-11 13:19:57 -0600 |
|---|---|---|
| committer | Caleb Cartwright <caleb.cartwright@outlook.com> | 2020-01-11 13:19:57 -0600 |
| commit | ed039e8f8443a84dddfda8be7379ca7b4aaeccd9 (patch) | |
| tree | 5b11e30072657d6688d02190d8516044078e2292 /src/librustc_parse/parser/module.rs | |
| parent | 1389494ac145a84dba025ff65969f7ab150c3f02 (diff) | |
| download | rust-ed039e8f8443a84dddfda8be7379ca7b4aaeccd9.tar.gz rust-ed039e8f8443a84dddfda8be7379ca7b4aaeccd9.zip | |
restore some rustc_parse visibilities
Diffstat (limited to 'src/librustc_parse/parser/module.rs')
| -rw-r--r-- | src/librustc_parse/parser/module.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/librustc_parse/parser/module.rs b/src/librustc_parse/parser/module.rs index 3254ab5b463..6ce94d3c679 100644 --- a/src/librustc_parse/parser/module.rs +++ b/src/librustc_parse/parser/module.rs @@ -14,13 +14,15 @@ use syntax::token::{self, TokenKind}; use std::path::{self, Path, PathBuf}; /// Information about the path to a module. -pub(super) struct ModulePath { +// Public for rustfmt usage. +pub struct ModulePath { name: String, path_exists: bool, pub result: Result<ModulePathSuccess, Error>, } -pub(super) struct ModulePathSuccess { +// Public for rustfmt usage. +pub struct ModulePathSuccess { pub path: PathBuf, pub directory_ownership: DirectoryOwnership, } @@ -177,7 +179,8 @@ impl<'a> Parser<'a> { } } - pub(super) fn submod_path_from_attr(attrs: &[Attribute], dir_path: &Path) -> Option<PathBuf> { + // Public for rustfmt usage. + pub fn submod_path_from_attr(attrs: &[Attribute], dir_path: &Path) -> Option<PathBuf> { if let Some(s) = attr::first_attr_value_str_by_name(attrs, sym::path) { let s = s.as_str(); @@ -194,7 +197,8 @@ impl<'a> Parser<'a> { } /// Returns a path to a module. - pub(super) fn default_submod_path( + // Public for rustfmt usage. + pub fn default_submod_path( id: ast::Ident, relative: Option<ast::Ident>, dir_path: &Path, |
