aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/body
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/body')
-rw-r--r--crates/ra_hir_def/src/body/lower.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs
index 113ec2b78..f159f80af 100644
--- a/crates/ra_hir_def/src/body/lower.rs
+++ b/crates/ra_hir_def/src/body/lower.rs
@@ -3,7 +3,6 @@
3 3
4use either::Either; 4use either::Either;
5use hir_expand::{ 5use hir_expand::{
6 db::AstDatabase,
7 hygiene::Hygiene, 6 hygiene::Hygiene,
8 name::{name, AsName, Name}, 7 name::{name, AsName, Name},
9 HirFileId, MacroDefId, MacroDefKind, 8 HirFileId, MacroDefId, MacroDefKind,
@@ -42,8 +41,8 @@ pub(crate) struct LowerCtx {
42} 41}
43 42
44impl LowerCtx { 43impl LowerCtx {
45 pub fn new(db: &dyn AstDatabase, file_id: HirFileId) -> Self { 44 pub fn new(db: &dyn DefDatabase, file_id: HirFileId) -> Self {
46 LowerCtx { hygiene: Hygiene::new(db, file_id) } 45 LowerCtx { hygiene: Hygiene::new(db.upcast(), file_id) }
47 } 46 }
48 pub fn with_hygiene(hygiene: &Hygiene) -> Self { 47 pub fn with_hygiene(hygiene: &Hygiene) -> Self {
49 LowerCtx { hygiene: hygiene.clone() } 48 LowerCtx { hygiene: hygiene.clone() }
@@ -120,7 +119,7 @@ impl ExprCollector<'_> {
120 } 119 }
121 120
122 fn ctx(&self) -> LowerCtx { 121 fn ctx(&self) -> LowerCtx {
123 LowerCtx::new(self.db.upcast(), self.expander.current_file_id) 122 LowerCtx::new(self.db, self.expander.current_file_id)
124 } 123 }
125 124
126 fn alloc_expr(&mut self, expr: Expr, ptr: AstPtr<ast::Expr>) -> ExprId { 125 fn alloc_expr(&mut self, expr: Expr, ptr: AstPtr<ast::Expr>) -> ExprId {