mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
gc syntax trees
This commit is contained in:
parent
35568cf057
commit
bc4de7128f
2 changed files with 37 additions and 36 deletions
|
@ -18,8 +18,7 @@ use salsa::{ParallelDatabase, Database};
|
|||
use crate::{
|
||||
AnalysisChange,
|
||||
db::{
|
||||
self, SyntaxDatabase,
|
||||
|
||||
self, SyntaxDatabase, FileSyntaxQuery,
|
||||
},
|
||||
input::{SourceRootId, FilesDatabase, SourceRoot, WORKSPACE},
|
||||
descriptors::module::{ModulesDatabase, ModuleTree, Problem},
|
||||
|
@ -194,6 +193,8 @@ impl AnalysisImpl {
|
|||
.filter_map(|it| it.ok())
|
||||
.collect()
|
||||
};
|
||||
self.db.query(FileSyntaxQuery)
|
||||
.sweep(salsa::SweepStrategy::default().discard_values());
|
||||
Ok(query.search(&buf))
|
||||
}
|
||||
fn module_tree(&self, file_id: FileId) -> Cancelable<Arc<ModuleTree>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue