aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/body
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-05-06 22:23:50 +0100
committerJonas Schievink <[email protected]>2021-05-06 22:23:50 +0100
commit20ae41c1a12963e938cb3bd4c7c84007412d6fa6 (patch)
tree361153338ec7c32866a5477b3e7681d05a4b0b7c /crates/hir_def/src/body
parentc4f9cb9b53314b584f6451908ce40bbd65453116 (diff)
Reuse database in LowerCtx
Diffstat (limited to 'crates/hir_def/src/body')
-rw-r--r--crates/hir_def/src/body/lower.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_def/src/body/lower.rs b/crates/hir_def/src/body/lower.rs
index e4fa7f9c9..75dc19c11 100644
--- a/crates/hir_def/src/body/lower.rs
+++ b/crates/hir_def/src/body/lower.rs
@@ -41,7 +41,7 @@ use crate::{
41use super::{diagnostics::BodyDiagnostic, ExprSource, PatSource}; 41use super::{diagnostics::BodyDiagnostic, ExprSource, PatSource};
42 42
43pub struct LowerCtx<'a> { 43pub struct LowerCtx<'a> {
44 db: &'a dyn DefDatabase, 44 pub db: &'a dyn DefDatabase,
45 hygiene: Hygiene, 45 hygiene: Hygiene,
46 file_id: Option<HirFileId>, 46 file_id: Option<HirFileId>,
47 source_ast_id_map: Option<Arc<AstIdMap>>, 47 source_ast_id_map: Option<Arc<AstIdMap>>,
@@ -70,7 +70,7 @@ impl<'a> LowerCtx<'a> {
70 } 70 }
71 71
72 pub(crate) fn lower_path(&self, ast: ast::Path) -> Option<Path> { 72 pub(crate) fn lower_path(&self, ast: ast::Path) -> Option<Path> {
73 Path::from_src(self.db, ast, self) 73 Path::from_src(ast, self)
74 } 74 }
75 75
76 pub(crate) fn ast_id<N: AstNode>(&self, item: &N) -> Option<FileAstId<N>> { 76 pub(crate) fn ast_id<N: AstNode>(&self, item: &N) -> Option<FileAstId<N>> {