diff options
author | Aleksey Kladov <[email protected]> | 2020-04-17 10:38:51 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-04-17 11:25:41 +0100 |
commit | 302bf97bbf1855e3c7def9ab4f9f3d338be5e3b7 (patch) | |
tree | f26fcf569dea4fa40ca3814d30e340572a66374b /crates/ra_hir_expand/src | |
parent | 69f0cb6cd77c2dc93f2eed180a6c16fd8c3fca5a (diff) |
Don't expose impl details of SyntaxPtr
Diffstat (limited to 'crates/ra_hir_expand/src')
-rw-r--r-- | crates/ra_hir_expand/src/diagnostics.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/ra_hir_expand/src/diagnostics.rs b/crates/ra_hir_expand/src/diagnostics.rs index 108c1e38c..714e700f7 100644 --- a/crates/ra_hir_expand/src/diagnostics.rs +++ b/crates/ra_hir_expand/src/diagnostics.rs | |||
@@ -22,10 +22,8 @@ use crate::{db::AstDatabase, InFile}; | |||
22 | 22 | ||
23 | pub trait Diagnostic: Any + Send + Sync + fmt::Debug + 'static { | 23 | pub trait Diagnostic: Any + Send + Sync + fmt::Debug + 'static { |
24 | fn message(&self) -> String; | 24 | fn message(&self) -> String; |
25 | fn highlight_range(&self) -> TextRange; | ||
25 | fn source(&self) -> InFile<SyntaxNodePtr>; | 26 | fn source(&self) -> InFile<SyntaxNodePtr>; |
26 | fn highlight_range(&self) -> TextRange { | ||
27 | self.source().value.range() | ||
28 | } | ||
29 | fn as_any(&self) -> &(dyn Any + Send + 'static); | 27 | fn as_any(&self) -> &(dyn Any + Send + 'static); |
30 | } | 28 | } |
31 | 29 | ||