Skip to content

Commit 97f94a6

Browse files
committed
Tweak lower_pattern
1 parent c6e3543 commit 97f94a6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler/rustc_mir_build/src/thir/pattern/check_match.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,10 @@ impl<'thir, 'p, 'tcx> MatchVisitor<'thir, 'p, 'tcx> {
279279
} else {
280280
// Check the pattern for some things unrelated to exhaustiveness.
281281
let refutable = if cx.refutable { Refutable } else { Irrefutable };
282-
pat.walk_always(|pat| check_borrow_conflicts_in_at_patterns(self, pat));
283-
pat.walk_always(|pat| check_for_bindings_named_same_as_variants(self, pat, refutable));
282+
pat.walk_always(|pat| {
283+
check_borrow_conflicts_in_at_patterns(self, pat);
284+
check_for_bindings_named_same_as_variants(self, pat, refutable);
285+
});
284286
Ok(cx.pattern_arena.alloc(DeconstructedPat::from_pat(cx, pat)))
285287
}
286288
}

0 commit comments

Comments
 (0)