aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/body
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-11-02 13:08:53 +0000
committerGitHub <[email protected]>2020-11-02 13:08:53 +0000
commit731b38fa3c1694648e6c8e60f61820f9783343eb (patch)
treeb3f4e94e8eac9bb24296aacafacb100930bee59e /crates/hir_def/src/body
parent6507877e7039d4517682a4fc232356662f509d81 (diff)
parentb6101184537b1165cfdd5fc473e04ad4c5b7bffa (diff)
Merge #6438
6438: Deny unreachable-pub r=matklad a=matklad 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. Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/hir_def/src/body')
-rw-r--r--crates/hir_def/src/body/lower.rs6
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
47impl LowerCtx { 47impl 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}