diff options
author | Benjamin Coenen <[email protected]> | 2020-04-18 16:14:24 +0100 |
---|---|---|
committer | Benjamin Coenen <[email protected]> | 2020-04-18 16:14:24 +0100 |
commit | af3c19e85f55db9277ce9ad5b784df2ccfe3c9e4 (patch) | |
tree | 7a777f22f5fa79704b8d2c9aa8d67255d12123be /crates/ra_hir_expand/src/diagnostics.rs | |
parent | 379787858bbfb2691e134942d94fcbc70c5d1d7f (diff) | |
parent | 84e3304a9bf0d68e30d58b1e37a6db2e9ec97525 (diff) |
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer
Diffstat (limited to 'crates/ra_hir_expand/src/diagnostics.rs')
-rw-r--r-- | crates/ra_hir_expand/src/diagnostics.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_hir_expand/src/diagnostics.rs b/crates/ra_hir_expand/src/diagnostics.rs index 108c1e38c..99209c6e8 100644 --- a/crates/ra_hir_expand/src/diagnostics.rs +++ b/crates/ra_hir_expand/src/diagnostics.rs | |||
@@ -16,16 +16,13 @@ | |||
16 | 16 | ||
17 | use std::{any::Any, fmt}; | 17 | use std::{any::Any, fmt}; |
18 | 18 | ||
19 | use ra_syntax::{SyntaxNode, SyntaxNodePtr, TextRange}; | 19 | use ra_syntax::{SyntaxNode, SyntaxNodePtr}; |
20 | 20 | ||
21 | use crate::{db::AstDatabase, InFile}; | 21 | 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 source(&self) -> InFile<SyntaxNodePtr>; | 25 | 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); | 26 | fn as_any(&self) -> &(dyn Any + Send + 'static); |
30 | } | 27 | } |
31 | 28 | ||