From b6101184537b1165cfdd5fc473e04ad4c5b7bffa Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 2 Nov 2020 13:13:32 +0100 Subject: Deny unreachable-pub It's very useful when `pub` is equivalent to "this is crate's public API", let's enforce this! Ideally, we should enforce it for local `cargo test`, and only during CI, but that needs https://github.com/rust-lang/cargo/issues/5034. --- crates/hir_def/src/body/lower.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/hir_def/src/body') diff --git a/crates/hir_def/src/body/lower.rs b/crates/hir_def/src/body/lower.rs index ddc267b83..1deaa90f2 100644 --- a/crates/hir_def/src/body/lower.rs +++ b/crates/hir_def/src/body/lower.rs @@ -45,14 +45,14 @@ pub(crate) struct LowerCtx { } impl LowerCtx { - pub fn new(db: &dyn DefDatabase, file_id: HirFileId) -> Self { + pub(crate) fn new(db: &dyn DefDatabase, file_id: HirFileId) -> Self { LowerCtx { hygiene: Hygiene::new(db.upcast(), file_id) } } - pub fn with_hygiene(hygiene: &Hygiene) -> Self { + pub(crate) fn with_hygiene(hygiene: &Hygiene) -> Self { LowerCtx { hygiene: hygiene.clone() } } - pub fn lower_path(&self, ast: ast::Path) -> Option { + pub(crate) fn lower_path(&self, ast: ast::Path) -> Option { Path::from_src(ast, &self.hygiene) } } -- cgit v1.2.3