diff options
author | Jonas Schievink <[email protected]> | 2020-06-24 15:21:00 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2020-06-24 15:54:21 +0100 |
commit | 59d4640b644fa12ecc8f5075d92e5c53124e5dd7 (patch) | |
tree | 54d5eb6ca9e13eaf7c0a9fa8f8fe1199630c4cd7 /crates/ra_hir_def/src/body | |
parent | d4ddec2bdfc0766782a662b87e1456a9041e8182 (diff) |
Remove unneeded HirFileId argument
Diffstat (limited to 'crates/ra_hir_def/src/body')
-rw-r--r-- | crates/ra_hir_def/src/body/lower.rs | 7 |
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 | ||
58 | pub(super) fn lower( | 58 | pub(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 | } |