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 a74136b8e..852d5cda7 100644
--- a/crates/ra_hir_def/src/body/lower.rs
+++ b/crates/ra_hir_def/src/body/lower.rs
@@ -57,17 +57,15 @@ impl LowerCtx {
57 57
58pub(super) fn lower( 58pub(super) fn lower(
59 db: &dyn DefDatabase, 59 db: &dyn DefDatabase,
60 file_id: HirFileId,
61 def: DefWithBodyId, 60 def: DefWithBodyId,
62 expander: Expander, 61 expander: Expander,
63 params: Option<ast::ParamList>, 62 params: Option<ast::ParamList>,
64 body: Option<ast::Expr>, 63 body: Option<ast::Expr>,
65) -> (Body, BodySourceMap) { 64) -> (Body, BodySourceMap) {
66 let item_tree = db.item_tree(file_id); 65 let item_tree = db.item_tree(expander.current_file_id);
67 ExprCollector { 66 ExprCollector {
68 db, 67 db,
69 def, 68 def,
70 expander,
71 source_map: BodySourceMap::default(), 69 source_map: BodySourceMap::default(),
72 body: Body { 70 body: Body {
73 exprs: Arena::default(), 71 exprs: Arena::default(),
@@ -76,7 +74,8 @@ pub(super) fn lower(
76 body_expr: dummy_expr_id(), 74 body_expr: dummy_expr_id(),
77 item_scope: Default::default(), 75 item_scope: Default::default(),
78 }, 76 },
79 item_trees: vec![(file_id, item_tree)], 77 item_trees: vec![(expander.current_file_id, item_tree)],
78 expander,
80 } 79 }
81 .collect(params, body) 80 .collect(params, body)
82} 81}