diff options
Diffstat (limited to 'crates/ra_hir_def/src/diagnostics.rs')
-rw-r--r-- | crates/ra_hir_def/src/diagnostics.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/crates/ra_hir_def/src/diagnostics.rs b/crates/ra_hir_def/src/diagnostics.rs index 2ee28fbaa..510c5e064 100644 --- a/crates/ra_hir_def/src/diagnostics.rs +++ b/crates/ra_hir_def/src/diagnostics.rs | |||
@@ -4,7 +4,7 @@ use std::any::Any; | |||
4 | 4 | ||
5 | use hir_expand::diagnostics::Diagnostic; | 5 | use hir_expand::diagnostics::Diagnostic; |
6 | use ra_db::RelativePathBuf; | 6 | use ra_db::RelativePathBuf; |
7 | use ra_syntax::{ast, AstPtr, SyntaxNodePtr, TextRange}; | 7 | use ra_syntax::{ast, AstPtr, SyntaxNodePtr}; |
8 | 8 | ||
9 | use hir_expand::{HirFileId, InFile}; | 9 | use hir_expand::{HirFileId, InFile}; |
10 | 10 | ||
@@ -12,7 +12,6 @@ use hir_expand::{HirFileId, InFile}; | |||
12 | pub struct UnresolvedModule { | 12 | pub struct UnresolvedModule { |
13 | pub file: HirFileId, | 13 | pub file: HirFileId, |
14 | pub decl: AstPtr<ast::Module>, | 14 | pub decl: AstPtr<ast::Module>, |
15 | pub highlight_range: TextRange, | ||
16 | pub candidate: RelativePathBuf, | 15 | pub candidate: RelativePathBuf, |
17 | } | 16 | } |
18 | 17 | ||
@@ -20,9 +19,6 @@ impl Diagnostic for UnresolvedModule { | |||
20 | fn message(&self) -> String { | 19 | fn message(&self) -> String { |
21 | "unresolved module".to_string() | 20 | "unresolved module".to_string() |
22 | } | 21 | } |
23 | fn highlight_range(&self) -> InFile<TextRange> { | ||
24 | InFile::new(self.file, self.highlight_range) | ||
25 | } | ||
26 | fn source(&self) -> InFile<SyntaxNodePtr> { | 22 | fn source(&self) -> InFile<SyntaxNodePtr> { |
27 | InFile::new(self.file, self.decl.clone().into()) | 23 | InFile::new(self.file, self.decl.clone().into()) |
28 | } | 24 | } |