aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src/diagnostics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir/src/diagnostics.rs')
-rw-r--r--crates/hir/src/diagnostics.rs19
1 files changed, 1 insertions, 18 deletions
diff --git a/crates/hir/src/diagnostics.rs b/crates/hir/src/diagnostics.rs
index c2d608eb5..5cffef47f 100644
--- a/crates/hir/src/diagnostics.rs
+++ b/crates/hir/src/diagnostics.rs
@@ -38,6 +38,7 @@ diagnostics![
38 MacroError, 38 MacroError,
39 MismatchedArgCount, 39 MismatchedArgCount,
40 MissingFields, 40 MissingFields,
41 MissingMatchArms,
41 MissingOkOrSomeInTailExpr, 42 MissingOkOrSomeInTailExpr,
42 MissingUnsafe, 43 MissingUnsafe,
43 NoSuchField, 44 NoSuchField,
@@ -149,9 +150,6 @@ pub struct MissingOkOrSomeInTailExpr {
149 pub required: String, 150 pub required: String,
150} 151}
151 152
152// Diagnostic: missing-match-arm
153//
154// This diagnostic is triggered if `match` block is missing one or more match arms.
155#[derive(Debug)] 153#[derive(Debug)]
156pub struct MissingMatchArms { 154pub struct MissingMatchArms {
157 pub file: HirFileId, 155 pub file: HirFileId,
@@ -159,21 +157,6 @@ pub struct MissingMatchArms {
159 pub arms: AstPtr<ast::MatchArmList>, 157 pub arms: AstPtr<ast::MatchArmList>,
160} 158}
161 159
162impl Diagnostic for MissingMatchArms {
163 fn code(&self) -> DiagnosticCode {
164 DiagnosticCode("missing-match-arm")
165 }
166 fn message(&self) -> String {
167 String::from("Missing match arm")
168 }
169 fn display_source(&self) -> InFile<SyntaxNodePtr> {
170 InFile { file_id: self.file, value: self.match_expr.clone().into() }
171 }
172 fn as_any(&self) -> &(dyn Any + Send + 'static) {
173 self
174 }
175}
176
177#[derive(Debug)] 160#[derive(Debug)]
178pub struct InternalBailedOut { 161pub struct InternalBailedOut {
179 pub file: HirFileId, 162 pub file: HirFileId,