aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/diagnostics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/diagnostics.rs')
-rw-r--r--crates/ra_hir/src/diagnostics.rs21
1 files changed, 1 insertions, 20 deletions
diff --git a/crates/ra_hir/src/diagnostics.rs b/crates/ra_hir/src/diagnostics.rs
index a33af8f46..1751e7be3 100644
--- a/crates/ra_hir/src/diagnostics.rs
+++ b/crates/ra_hir/src/diagnostics.rs
@@ -3,10 +3,10 @@
3use std::any::Any; 3use std::any::Any;
4 4
5use ra_syntax::{ast, AstNode, AstPtr, SyntaxNodePtr}; 5use ra_syntax::{ast, AstNode, AstPtr, SyntaxNodePtr};
6use relative_path::RelativePathBuf;
7 6
8use crate::{db::AstDatabase, HirFileId, Name, Source}; 7use crate::{db::AstDatabase, HirFileId, Name, Source};
9 8
9pub use hir_def::diagnostics::UnresolvedModule;
10pub use hir_expand::diagnostics::{AstDiagnostic, Diagnostic, DiagnosticSink}; 10pub use hir_expand::diagnostics::{AstDiagnostic, Diagnostic, DiagnosticSink};
11 11
12#[derive(Debug)] 12#[derive(Debug)]
@@ -30,25 +30,6 @@ impl Diagnostic for NoSuchField {
30} 30}
31 31
32#[derive(Debug)] 32#[derive(Debug)]
33pub struct UnresolvedModule {
34 pub file: HirFileId,
35 pub decl: AstPtr<ast::Module>,
36 pub candidate: RelativePathBuf,
37}
38
39impl Diagnostic for UnresolvedModule {
40 fn message(&self) -> String {
41 "unresolved module".to_string()
42 }
43 fn source(&self) -> Source<SyntaxNodePtr> {
44 Source { file_id: self.file, ast: self.decl.into() }
45 }
46 fn as_any(&self) -> &(dyn Any + Send + 'static) {
47 self
48 }
49}
50
51#[derive(Debug)]
52pub struct MissingFields { 33pub struct MissingFields {
53 pub file: HirFileId, 34 pub file: HirFileId,
54 pub field_list: AstPtr<ast::RecordFieldList>, 35 pub field_list: AstPtr<ast::RecordFieldList>,