mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
eagarly clean astd maps
This commit is contained in:
parent
11cc8024a1
commit
6c63a59425
4 changed files with 9 additions and 3 deletions
|
@ -186,6 +186,7 @@ impl RootDatabase {
|
|||
if let Some(crate_graph) = change.crate_graph {
|
||||
self.set_crate_graph(Arc::new(crate_graph))
|
||||
}
|
||||
self.collect_after_change()
|
||||
}
|
||||
|
||||
fn apply_root_change(&mut self, root_id: SourceRootId, root_change: RootChange) {
|
||||
|
@ -228,4 +229,9 @@ impl RootDatabase {
|
|||
self.query(hir::db::RawItemsWithSourceMapQuery).sweep(sweep);
|
||||
self.query(hir::db::BodyWithSourceMapQuery).sweep(sweep);
|
||||
}
|
||||
|
||||
pub(crate) fn collect_after_change(&mut self) {
|
||||
let sweep = SweepStrategy::default().discard_everything().sweep_all_revisions();
|
||||
self.query(hir::db::AstIdToNodeQuery).sweep(sweep)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue