diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-10-08 09:35:34 +0200 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-10-16 10:59:53 +0200 |
| commit | c189565edc5c9fc516170885b3a3061b936205fb (patch) | |
| tree | 9b7deb9d35aa293c01251707bb915143551aec71 /src/libsyntax/parse/parser/module.rs | |
| parent | 98017ca53a0c3ac6a10f60b47462bd3546baaaa1 (diff) | |
| download | rust-c189565edc5c9fc516170885b3a3061b936205fb.tar.gz rust-c189565edc5c9fc516170885b3a3061b936205fb.zip | |
syntax: reduce visibilities
Diffstat (limited to 'src/libsyntax/parse/parser/module.rs')
| -rw-r--r-- | src/libsyntax/parse/parser/module.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/parse/parser/module.rs b/src/libsyntax/parse/parser/module.rs index 20bd189cf8f..1a8178f0bec 100644 --- a/src/libsyntax/parse/parser/module.rs +++ b/src/libsyntax/parse/parser/module.rs @@ -12,13 +12,13 @@ use crate::symbol::sym; use std::path::{self, Path, PathBuf}; /// Information about the path to a module. -pub struct ModulePath { +pub(super) struct ModulePath { name: String, path_exists: bool, pub result: Result<ModulePathSuccess, Error>, } -pub struct ModulePathSuccess { +pub(super) struct ModulePathSuccess { pub path: PathBuf, pub directory_ownership: DirectoryOwnership, warn: bool, @@ -26,7 +26,7 @@ pub struct ModulePathSuccess { impl<'a> Parser<'a> { /// Parses a source module as a crate. This is the main entry point for the parser. - pub fn parse_crate_mod(&mut self) -> PResult<'a, Crate> { + crate fn parse_crate_mod(&mut self) -> PResult<'a, Crate> { let lo = self.token.span; let krate = Ok(ast::Crate { attrs: self.parse_inner_attributes()?, @@ -198,7 +198,7 @@ impl<'a> Parser<'a> { } } - pub fn submod_path_from_attr(attrs: &[Attribute], dir_path: &Path) -> Option<PathBuf> { + pub(super) 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(); @@ -215,7 +215,7 @@ impl<'a> Parser<'a> { } /// Returns a path to a module. - pub fn default_submod_path( + pub(super) fn default_submod_path( id: ast::Ident, relative: Option<ast::Ident>, dir_path: &Path, |
