diff options
author | Kirill Bulatov <[email protected]> | 2020-08-10 22:55:57 +0100 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2020-08-11 13:09:08 +0100 |
commit | c8cad76d25f7fab856c9646b70122e0f9f7d7218 (patch) | |
tree | 67091cef7037bbde1fc0d2da599562775a954f49 /crates/ra_hir/src | |
parent | 29fbc8e02180aac1f4d7819a9626206aa64028a0 (diff) |
Improve the ide diagnostics trait API
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/semantics.rs | 5 |
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 | ||