diff options
| author | bors <bors@rust-lang.org> | 2023-05-04 18:47:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-05-04 18:47:04 +0000 |
| commit | 0dd94d3b078fa524272f942f69239a9564532fe1 (patch) | |
| tree | 65a20b9f8777a972a64e67446da58d3fd350903f | |
| parent | 0d5773e04e2433fb7e5f08514426d2d5ce399427 (diff) | |
| parent | 9419fcb109c2659084eadf05c5b188e514340b80 (diff) | |
Auto merge of #14738 - Veykril:def-map-fix, r=Veykril
fix: Fix body lowering not using block def maps Fixes the issue in the comment here https://github.com/rust-lang/rust-analyzer/issues/10084#issuecomment-1534320254, not the general issue unfortunately.
| -rw-r--r-- | crates/base-db/src/change.rs | 4 | ||||
| -rw-r--r-- | crates/hir-def/src/body/lower.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/base-db/src/change.rs b/crates/base-db/src/change.rs index 2b33457b6d5..6a3b36b2312 100644 --- a/crates/base-db/src/change.rs +++ b/crates/base-db/src/change.rs @@ -77,10 +77,10 @@ impl Change { db.set_file_text_with_durability(file_id, text, durability) } if let Some(crate_graph) = self.crate_graph { - db.set_crate_graph_with_durability(Arc::new(crate_graph), Durability::HIGH) + db.set_crate_graph_with_durability(Arc::new(crate_graph), Durability::HIGH); } if let Some(proc_macros) = self.proc_macros { - db.set_proc_macros_with_durability(Arc::new(proc_macros), Durability::HIGH) + db.set_proc_macros_with_durability(Arc::new(proc_macros), Durability::HIGH); } } } diff --git a/crates/hir-def/src/body/lower.rs b/crates/hir-def/src/body/lower.rs index 0ecad857a44..80aa1af057c 100644 --- a/crates/hir-def/src/body/lower.rs +++ b/crates/hir-def/src/body/lower.rs @@ -54,7 +54,7 @@ pub(super) fn lower( ExprCollector { db, krate, - def_map: db.crate_def_map(krate), + def_map: expander.module.def_map(db), source_map: BodySourceMap::default(), ast_id_map: db.ast_id_map(expander.current_file_id), body: Body { |
