aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r--crates/ra_ide_api/src/change.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/change.rs b/crates/ra_ide_api/src/change.rs
index 5bfdbe7e9..16b9ef3d5 100644
--- a/crates/ra_ide_api/src/change.rs
+++ b/crates/ra_ide_api/src/change.rs
@@ -186,6 +186,7 @@ impl RootDatabase {
186 if let Some(crate_graph) = change.crate_graph { 186 if let Some(crate_graph) = change.crate_graph {
187 self.set_crate_graph(Arc::new(crate_graph)) 187 self.set_crate_graph(Arc::new(crate_graph))
188 } 188 }
189 self.collect_after_change()
189 } 190 }
190 191
191 fn apply_root_change(&mut self, root_id: SourceRootId, root_change: RootChange) { 192 fn apply_root_change(&mut self, root_id: SourceRootId, root_change: RootChange) {
@@ -228,4 +229,9 @@ impl RootDatabase {
228 self.query(hir::db::RawItemsWithSourceMapQuery).sweep(sweep); 229 self.query(hir::db::RawItemsWithSourceMapQuery).sweep(sweep);
229 self.query(hir::db::BodyWithSourceMapQuery).sweep(sweep); 230 self.query(hir::db::BodyWithSourceMapQuery).sweep(sweep);
230 } 231 }
232
233 pub(crate) fn collect_after_change(&mut self) {
234 let sweep = SweepStrategy::default().discard_everything().sweep_all_revisions();
235 self.query(hir::db::AstIdToNodeQuery).sweep(sweep)
236 }
231} 237}