aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/diagnostics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty/src/diagnostics.rs')
-rw-r--r--crates/ra_hir_ty/src/diagnostics.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_hir_ty/src/diagnostics.rs b/crates/ra_hir_ty/src/diagnostics.rs
index 3457905e2..8cbce1168 100644
--- a/crates/ra_hir_ty/src/diagnostics.rs
+++ b/crates/ra_hir_ty/src/diagnostics.rs
@@ -65,6 +65,7 @@ impl AstDiagnostic for MissingFields {
65#[derive(Debug)] 65#[derive(Debug)]
66pub struct MissingMatchArms { 66pub struct MissingMatchArms {
67 pub file: HirFileId, 67 pub file: HirFileId,
68 pub match_expr: AstPtr<ast::Expr>,
68 pub arms: AstPtr<ast::MatchArmList>, 69 pub arms: AstPtr<ast::MatchArmList>,
69} 70}
70 71
@@ -73,7 +74,7 @@ impl Diagnostic for MissingMatchArms {
73 String::from("Missing match arm") 74 String::from("Missing match arm")
74 } 75 }
75 fn source(&self) -> InFile<SyntaxNodePtr> { 76 fn source(&self) -> InFile<SyntaxNodePtr> {
76 InFile { file_id: self.file, value: self.arms.into() } 77 InFile { file_id: self.file, value: self.match_expr.into() }
77 } 78 }
78 fn as_any(&self) -> &(dyn Any + Send + 'static) { 79 fn as_any(&self) -> &(dyn Any + Send + 'static) {
79 self 80 self