Skip to content

Commit 6bd8c6d

Browse files
committed
or-patterns: check_match: remove top_pats_hack for check_for_bindings_named_same_as_variants.
1 parent 9b406f1 commit 6bd8c6d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/librustc_mir/hair/pattern/check_match.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,7 @@ impl<'tcx> MatchVisitor<'_, 'tcx> {
146146
}
147147

148148
// Third, perform some lints.
149-
for pat in arm.top_pats_hack() {
150-
check_for_bindings_named_same_as_variants(self, pat);
151-
}
149+
check_for_bindings_named_same_as_variants(self, &arm.pat);
152150
}
153151

154152
let module = self.tcx.hir().get_module_parent(scrut.hir_id);

0 commit comments

Comments
 (0)