or-patterns: check_match: remove top_pats_hack for check_for_bindings_named_same_as_variants.

This commit is contained in:
Mazdak Farrokhzad 2019-09-15 19:53:59 +02:00
parent 9b406f1069
commit 6bd8c6d4f4

View file

@ -146,9 +146,7 @@ impl<'tcx> MatchVisitor<'_, 'tcx> {
}
// Third, perform some lints.
for pat in arm.top_pats_hack() {
check_for_bindings_named_same_as_variants(self, pat);
}
check_for_bindings_named_same_as_variants(self, &arm.pat);
}
let module = self.tcx.hir().get_module_parent(scrut.hir_id);