aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-10-29 10:58:11 +0000
committerAleksey Kladov <[email protected]>2018-10-29 10:58:11 +0000
commitbc4de7128f474f75a9eff6591923657025099b74 (patch)
tree00b2013c272802c5136ebcf5514fbe1d602bf681 /crates/ra_analysis/src
parent35568cf057e116ef3471b3c5e50beeb2f6bc7e70 (diff)
gc syntax trees
Diffstat (limited to 'crates/ra_analysis/src')
-rw-r--r--crates/ra_analysis/src/imp.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs
index 90446c838..3557bb5cc 100644
--- a/crates/ra_analysis/src/imp.rs
+++ b/crates/ra_analysis/src/imp.rs
@@ -18,8 +18,7 @@ use salsa::{ParallelDatabase, Database};
18use crate::{ 18use crate::{
19 AnalysisChange, 19 AnalysisChange,
20 db::{ 20 db::{
21 self, SyntaxDatabase, 21 self, SyntaxDatabase, FileSyntaxQuery,
22
23 }, 22 },
24 input::{SourceRootId, FilesDatabase, SourceRoot, WORKSPACE}, 23 input::{SourceRootId, FilesDatabase, SourceRoot, WORKSPACE},
25 descriptors::module::{ModulesDatabase, ModuleTree, Problem}, 24 descriptors::module::{ModulesDatabase, ModuleTree, Problem},
@@ -194,6 +193,8 @@ impl AnalysisImpl {
194 .filter_map(|it| it.ok()) 193 .filter_map(|it| it.ok())
195 .collect() 194 .collect()
196 }; 195 };
196 self.db.query(FileSyntaxQuery)
197 .sweep(salsa::SweepStrategy::default().discard_values());
197 Ok(query.search(&buf)) 198 Ok(query.search(&buf))
198 } 199 }
199 fn module_tree(&self, file_id: FileId) -> Cancelable<Arc<ModuleTree>> { 200 fn module_tree(&self, file_id: FileId) -> Cancelable<Arc<ModuleTree>> {