diff options
Diffstat (limited to 'crates/ra_hir_ty/src/expr.rs')
-rw-r--r-- | crates/ra_hir_ty/src/expr.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_hir_ty/src/expr.rs b/crates/ra_hir_ty/src/expr.rs index 6efed6f9e..19323fda1 100644 --- a/crates/ra_hir_ty/src/expr.rs +++ b/crates/ra_hir_ty/src/expr.rs | |||
@@ -125,9 +125,12 @@ impl<'a, 'b> ExprValidator<'a, 'b> { | |||
125 | if let Some(expr) = source_ptr.value.left() { | 125 | if let Some(expr) = source_ptr.value.left() { |
126 | let root = source_ptr.file_syntax(db.upcast()); | 126 | let root = source_ptr.file_syntax(db.upcast()); |
127 | if let ast::Expr::MatchExpr(match_expr) = expr.to_node(&root) { | 127 | if let ast::Expr::MatchExpr(match_expr) = expr.to_node(&root) { |
128 | if let Some(arms) = match_expr.match_arm_list() { | 128 | if let (Some(match_expr), Some(arms)) = |
129 | (match_expr.expr(), match_expr.match_arm_list()) | ||
130 | { | ||
129 | self.sink.push(MissingMatchArms { | 131 | self.sink.push(MissingMatchArms { |
130 | file: source_ptr.file_id, | 132 | file: source_ptr.file_id, |
133 | match_expr: AstPtr::new(&match_expr), | ||
131 | arms: AstPtr::new(&arms), | 134 | arms: AstPtr::new(&arms), |
132 | }) | 135 | }) |
133 | } | 136 | } |