diff options
author | Kirill Bulatov <[email protected]> | 2020-08-11 15:15:11 +0100 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2020-08-11 15:52:05 +0100 |
commit | db12ccee96bf37367b39ad99638d06da7123c088 (patch) | |
tree | 6ade1ef7533d2ac235ccf507c48bde6c41289917 /crates/ra_hir/src | |
parent | 188ec3459e795732ad097758f7bf6b6b95bdbf5e (diff) |
Better naming and docs
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/semantics.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs index 2dfe69039..e3c417b41 100644 --- a/crates/ra_hir/src/semantics.rs +++ b/crates/ra_hir/src/semantics.rs | |||
@@ -138,8 +138,8 @@ impl<'db, DB: HirDatabase> Semantics<'db, DB> { | |||
138 | self.imp.original_range(node) | 138 | self.imp.original_range(node) |
139 | } | 139 | } |
140 | 140 | ||
141 | pub fn diagnostics_presentation_range(&self, diagnostics: &dyn Diagnostic) -> FileRange { | 141 | pub fn diagnostics_display_range(&self, diagnostics: &dyn Diagnostic) -> FileRange { |
142 | self.imp.diagnostics_presentation_range(diagnostics) | 142 | self.imp.diagnostics_display_range(diagnostics) |
143 | } | 143 | } |
144 | 144 | ||
145 | pub fn ancestors_with_macros(&self, node: SyntaxNode) -> impl Iterator<Item = SyntaxNode> + '_ { | 145 | pub fn ancestors_with_macros(&self, node: SyntaxNode) -> impl Iterator<Item = SyntaxNode> + '_ { |
@@ -369,8 +369,8 @@ impl<'db> SemanticsImpl<'db> { | |||
369 | original_range(self.db, node.as_ref()) | 369 | original_range(self.db, node.as_ref()) |
370 | } | 370 | } |
371 | 371 | ||
372 | fn diagnostics_presentation_range(&self, diagnostics: &dyn Diagnostic) -> FileRange { | 372 | fn diagnostics_display_range(&self, diagnostics: &dyn Diagnostic) -> FileRange { |
373 | let src = diagnostics.presentation(); | 373 | let src = diagnostics.display_source(); |
374 | let root = self.db.parse_or_expand(src.file_id).unwrap(); | 374 | let root = self.db.parse_or_expand(src.file_id).unwrap(); |
375 | let node = src.value.to_node(&root); | 375 | let node = src.value.to_node(&root); |
376 | self.cache(root, src.file_id); | 376 | self.cache(root, src.file_id); |