diff options
Diffstat (limited to 'crates/ra_hir_ty/src/diagnostics.rs')
-rw-r--r-- | crates/ra_hir_ty/src/diagnostics.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_hir_ty/src/diagnostics.rs b/crates/ra_hir_ty/src/diagnostics.rs index 4a13fac23..5054189cc 100644 --- a/crates/ra_hir_ty/src/diagnostics.rs +++ b/crates/ra_hir_ty/src/diagnostics.rs | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | use std::any::Any; | 3 | use std::any::Any; |
4 | 4 | ||
5 | use hir_expand::{db::AstDatabase, name::Name, HirFileId, Source}; | 5 | use hir_expand::{db::AstDatabase, name::Name, HirFileId, InFile}; |
6 | use ra_syntax::{ast, AstNode, AstPtr, SyntaxNodePtr}; | 6 | use ra_syntax::{ast, AstNode, AstPtr, SyntaxNodePtr}; |
7 | 7 | ||
8 | pub use hir_def::diagnostics::UnresolvedModule; | 8 | pub use hir_def::diagnostics::UnresolvedModule; |
@@ -19,8 +19,8 @@ impl Diagnostic for NoSuchField { | |||
19 | "no such field".to_string() | 19 | "no such field".to_string() |
20 | } | 20 | } |
21 | 21 | ||
22 | fn source(&self) -> Source<SyntaxNodePtr> { | 22 | fn source(&self) -> InFile<SyntaxNodePtr> { |
23 | Source { file_id: self.file, value: self.field.into() } | 23 | InFile { file_id: self.file, value: self.field.into() } |
24 | } | 24 | } |
25 | 25 | ||
26 | fn as_any(&self) -> &(dyn Any + Send + 'static) { | 26 | fn as_any(&self) -> &(dyn Any + Send + 'static) { |
@@ -44,8 +44,8 @@ impl Diagnostic for MissingFields { | |||
44 | } | 44 | } |
45 | message | 45 | message |
46 | } | 46 | } |
47 | fn source(&self) -> Source<SyntaxNodePtr> { | 47 | fn source(&self) -> InFile<SyntaxNodePtr> { |
48 | Source { file_id: self.file, value: self.field_list.into() } | 48 | InFile { file_id: self.file, value: self.field_list.into() } |
49 | } | 49 | } |
50 | fn as_any(&self) -> &(dyn Any + Send + 'static) { | 50 | fn as_any(&self) -> &(dyn Any + Send + 'static) { |
51 | self | 51 | self |
@@ -72,8 +72,8 @@ impl Diagnostic for MissingOkInTailExpr { | |||
72 | fn message(&self) -> String { | 72 | fn message(&self) -> String { |
73 | "wrap return expression in Ok".to_string() | 73 | "wrap return expression in Ok".to_string() |
74 | } | 74 | } |
75 | fn source(&self) -> Source<SyntaxNodePtr> { | 75 | fn source(&self) -> InFile<SyntaxNodePtr> { |
76 | Source { file_id: self.file, value: self.expr.into() } | 76 | InFile { file_id: self.file, value: self.expr.into() } |
77 | } | 77 | } |
78 | fn as_any(&self) -> &(dyn Any + Send + 'static) { | 78 | fn as_any(&self) -> &(dyn Any + Send + 'static) { |
79 | self | 79 | self |