aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/imp.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/imp.rs')
-rw-r--r--crates/ra_ide_api/src/imp.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_ide_api/src/imp.rs b/crates/ra_ide_api/src/imp.rs
index 1222fdc44..399433a01 100644
--- a/crates/ra_ide_api/src/imp.rs
+++ b/crates/ra_ide_api/src/imp.rs
@@ -76,9 +76,9 @@ impl db::RootDatabase {
76 /// syntax trees. However, if we actually do that, everything is recomputed 76 /// syntax trees. However, if we actually do that, everything is recomputed
77 /// for some reason. Needs investigation. 77 /// for some reason. Needs investigation.
78 pub(crate) fn collect_garbage(&mut self) { 78 pub(crate) fn collect_garbage(&mut self) {
79 self.query(ra_db::SourceFileQuery) 79 self.query(ra_db::ParseQuery)
80 .sweep(SweepStrategy::default().discard_values()); 80 .sweep(SweepStrategy::default().discard_values());
81 self.query(hir::db::HirSourceFileQuery) 81 self.query(hir::db::HirParseQuery)
82 .sweep(SweepStrategy::default().discard_values()); 82 .sweep(SweepStrategy::default().discard_values());
83 self.query(hir::db::FileItemsQuery) 83 self.query(hir::db::FileItemsQuery)
84 .sweep(SweepStrategy::default().discard_values()); 84 .sweep(SweepStrategy::default().discard_values());
@@ -102,7 +102,7 @@ impl db::RootDatabase {
102 } 102 }
103 103
104 pub(crate) fn find_all_refs(&self, position: FilePosition) -> Vec<(FileId, TextRange)> { 104 pub(crate) fn find_all_refs(&self, position: FilePosition) -> Vec<(FileId, TextRange)> {
105 let file = self.source_file(position.file_id); 105 let file = self.parse(position.file_id);
106 // Find the binding associated with the offset 106 // Find the binding associated with the offset
107 let (binding, descr) = match find_binding(self, &file, position) { 107 let (binding, descr) = match find_binding(self, &file, position) {
108 None => return Vec::new(), 108 None => return Vec::new(),
@@ -150,7 +150,7 @@ impl db::RootDatabase {
150 } 150 }
151 151
152 pub(crate) fn diagnostics(&self, file_id: FileId) -> Vec<Diagnostic> { 152 pub(crate) fn diagnostics(&self, file_id: FileId) -> Vec<Diagnostic> {
153 let syntax = self.source_file(file_id); 153 let syntax = self.parse(file_id);
154 154
155 let mut res = ra_ide_api_light::diagnostics(&syntax) 155 let mut res = ra_ide_api_light::diagnostics(&syntax)
156 .into_iter() 156 .into_iter()
@@ -214,7 +214,7 @@ impl db::RootDatabase {
214 } 214 }
215 215
216 pub(crate) fn assists(&self, frange: FileRange) -> Vec<SourceChange> { 216 pub(crate) fn assists(&self, frange: FileRange) -> Vec<SourceChange> {
217 let file = self.source_file(frange.file_id); 217 let file = self.parse(frange.file_id);
218 assists::assists(&file, frange.range) 218 assists::assists(&file, frange.range)
219 .into_iter() 219 .into_iter()
220 .map(|local_edit| SourceChange::from_local_edit(frange.file_id, local_edit)) 220 .map(|local_edit| SourceChange::from_local_edit(frange.file_id, local_edit))