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.
This commit is contained in:
commit
0dd94d3b07
@ -77,10 +77,10 @@ pub fn apply(self, db: &mut dyn SourceDatabaseExt) {
|
|||||||
db.set_file_text_with_durability(file_id, text, durability)
|
db.set_file_text_with_durability(file_id, text, durability)
|
||||||
}
|
}
|
||||||
if let Some(crate_graph) = self.crate_graph {
|
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 {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ pub(super) fn lower(
|
|||||||
ExprCollector {
|
ExprCollector {
|
||||||
db,
|
db,
|
||||||
krate,
|
krate,
|
||||||
def_map: db.crate_def_map(krate),
|
def_map: expander.module.def_map(db),
|
||||||
source_map: BodySourceMap::default(),
|
source_map: BodySourceMap::default(),
|
||||||
ast_id_map: db.ast_id_map(expander.current_file_id),
|
ast_id_map: db.ast_id_map(expander.current_file_id),
|
||||||
body: Body {
|
body: Body {
|
||||||
|
Loading…
Reference in New Issue
Block a user