Skip to content

Commit 9b406f1

Browse files
committed
or-patterns: regionck/link_match: remove top_pats_hack.
1 parent 38a5ae9 commit 9b406f1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/librustc_typeck/check/regionck.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,9 +1067,7 @@ impl<'a, 'tcx> RegionCtxt<'a, 'tcx> {
10671067
let discr_cmt = Rc::new(ignore_err!(self.with_mc(|mc| mc.cat_expr(discr))));
10681068
debug!("discr_cmt={:?}", discr_cmt);
10691069
for arm in arms {
1070-
for root_pat in arm.top_pats_hack() {
1071-
self.link_pattern(discr_cmt.clone(), &root_pat);
1072-
}
1070+
self.link_pattern(discr_cmt.clone(), &arm.pat);
10731071
}
10741072
}
10751073

0 commit comments

Comments
 (0)