From 20ae41c1a12963e938cb3bd4c7c84007412d6fa6 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Thu, 6 May 2021 23:23:50 +0200 Subject: Reuse database in LowerCtx --- crates/hir_def/src/body/lower.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 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 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::{ use super::{diagnostics::BodyDiagnostic, ExprSource, PatSource}; pub struct LowerCtx<'a> { - db: &'a dyn DefDatabase, + pub db: &'a dyn DefDatabase, hygiene: Hygiene, file_id: Option, source_ast_id_map: Option>, @@ -70,7 +70,7 @@ impl<'a> LowerCtx<'a> { } pub(crate) fn lower_path(&self, ast: ast::Path) -> Option { - Path::from_src(self.db, ast, self) + Path::from_src(ast, self) } pub(crate) fn ast_id(&self, item: &N) -> Option> { -- cgit v1.2.3