aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/body
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/body')
-rw-r--r--crates/hir_def/src/body/diagnostics.rs4
-rw-r--r--crates/hir_def/src/body/lower.rs6
2 files changed, 5 insertions, 5 deletions
diff --git a/crates/hir_def/src/body/diagnostics.rs b/crates/hir_def/src/body/diagnostics.rs
index cfa47d189..e57bdc133 100644
--- a/crates/hir_def/src/body/diagnostics.rs
+++ b/crates/hir_def/src/body/diagnostics.rs
@@ -5,12 +5,12 @@ use hir_expand::diagnostics::DiagnosticSink;
5use crate::diagnostics::InactiveCode; 5use crate::diagnostics::InactiveCode;
6 6
7#[derive(Debug, Eq, PartialEq)] 7#[derive(Debug, Eq, PartialEq)]
8pub enum BodyDiagnostic { 8pub(crate) enum BodyDiagnostic {
9 InactiveCode(InactiveCode), 9 InactiveCode(InactiveCode),
10} 10}
11 11
12impl BodyDiagnostic { 12impl BodyDiagnostic {
13 pub fn add_to(&self, sink: &mut DiagnosticSink<'_>) { 13 pub(crate) fn add_to(&self, sink: &mut DiagnosticSink<'_>) {
14 match self { 14 match self {
15 BodyDiagnostic::InactiveCode(diag) => { 15 BodyDiagnostic::InactiveCode(diag) => {
16 sink.push(diag.clone()); 16 sink.push(diag.clone());
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}