Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/lib.rs')
| -rw-r--r-- | crates/hir/src/lib.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 74dce1cca2..25c07a2fbd 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -1628,11 +1628,13 @@ impl DefWithBody { if let ast::Expr::MatchExpr(match_expr) = &source_ptr.value.to_node(&root) { - if let Some(match_expr) = match_expr.expr() { + if let Some(scrut_expr) = match_expr.expr() { acc.push( MissingMatchArms { - file: source_ptr.file_id, - match_expr: AstPtr::new(&match_expr), + scrutinee_expr: InFile::new( + source_ptr.file_id, + AstPtr::new(&scrut_expr), + ), uncovered_patterns, } .into(), |