aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/semantics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/semantics.rs')
-rw-r--r--crates/ra_hir/src/semantics.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs
index e9f7a033c..2dfe69039 100644
--- a/crates/ra_hir/src/semantics.rs
+++ b/crates/ra_hir/src/semantics.rs
@@ -109,10 +109,6 @@ impl<'db, DB: HirDatabase> Semantics<'db, DB> {
109 self.imp.parse(file_id) 109 self.imp.parse(file_id)
110 } 110 }
111 111
112 pub fn cache(&self, root_node: SyntaxNode, file_id: HirFileId) {
113 self.imp.cache(root_node, file_id)
114 }
115
116 pub fn expand(&self, macro_call: &ast::MacroCall) -> Option<SyntaxNode> { 112 pub fn expand(&self, macro_call: &ast::MacroCall) -> Option<SyntaxNode> {
117 self.imp.expand(macro_call) 113 self.imp.expand(macro_call)
118 } 114 }
@@ -377,6 +373,7 @@ impl<'db> SemanticsImpl<'db> {
377 let src = diagnostics.presentation(); 373 let src = diagnostics.presentation();
378 let root = self.db.parse_or_expand(src.file_id).unwrap(); 374 let root = self.db.parse_or_expand(src.file_id).unwrap();
379 let node = src.value.to_node(&root); 375 let node = src.value.to_node(&root);
376 self.cache(root, src.file_id);
380 original_range(self.db, src.with_value(&node)) 377 original_range(self.db, src.with_value(&node))
381 } 378 }
382 379