or-patterns: middle/dead: make a hack less hacky.
This commit is contained in:
parent
d7139f3e6d
commit
07deb93bb2
@ -260,8 +260,8 @@ fn visit_expr(&mut self, expr: &'tcx hir::Expr) {
|
||||
|
||||
fn visit_arm(&mut self, arm: &'tcx hir::Arm) {
|
||||
let pats = arm.top_pats_hack();
|
||||
if pats.len() == 1 {
|
||||
let variants = pats[0].necessary_variants();
|
||||
if let [pat] = pats {
|
||||
let variants = pat.necessary_variants();
|
||||
|
||||
// Inside the body, ignore constructions of variants
|
||||
// necessary for the pattern to match. Those construction sites
|
||||
|
Loading…
Reference in New Issue
Block a user