diff options
author | Aleksey Kladov <[email protected]> | 2020-11-02 12:13:32 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-11-02 13:07:08 +0000 |
commit | b6101184537b1165cfdd5fc473e04ad4c5b7bffa (patch) | |
tree | bcc2efd8a2696840a4724ad88758e973ecb77157 /crates/hir_def/src/body | |
parent | e7f90866bcf4b04a11e958eda0ac53f7ff0a607b (diff) |
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.
Diffstat (limited to 'crates/hir_def/src/body')
-rw-r--r-- | crates/hir_def/src/body/lower.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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 { | |||
45 | } | 45 | } |
46 | 46 | ||
47 | impl LowerCtx { | 47 | impl LowerCtx { |
48 | pub fn new(db: &dyn DefDatabase, file_id: HirFileId) -> Self { | 48 | pub(crate) fn new(db: &dyn DefDatabase, file_id: HirFileId) -> Self { |
49 | LowerCtx { hygiene: Hygiene::new(db.upcast(), file_id) } | 49 | LowerCtx { hygiene: Hygiene::new(db.upcast(), file_id) } |
50 | } | 50 | } |
51 | pub fn with_hygiene(hygiene: &Hygiene) -> Self { | 51 | pub(crate) fn with_hygiene(hygiene: &Hygiene) -> Self { |
52 | LowerCtx { hygiene: hygiene.clone() } | 52 | LowerCtx { hygiene: hygiene.clone() } |
53 | } | 53 | } |
54 | 54 | ||
55 | pub fn lower_path(&self, ast: ast::Path) -> Option<Path> { | 55 | pub(crate) fn lower_path(&self, ast: ast::Path) -> Option<Path> { |
56 | Path::from_src(ast, &self.hygiene) | 56 | Path::from_src(ast, &self.hygiene) |
57 | } | 57 | } |
58 | } | 58 | } |