@@ -1071,12 +1071,8 @@ pub(crate) struct MatchAutomatonStep<'a, 'c, 'pat, 'tcx> {
1071
1071
place : PlaceBuilder < ' tcx > ,
1072
1072
/// ... depending on the result, branch to one of these candidate lists...
1073
1073
target_candidates : Vec < Vec < & ' a mut Candidate < ' pat , ' tcx > > > ,
1074
- /// ... if it doesn't match, continue with these...
1074
+ /// ... if it doesn't match, continue with these.
1075
1075
remaining_candidates : & ' a mut [ & ' c mut Candidate < ' pat , ' tcx > ] ,
1076
- /// ... and if nothing matches, continue to this block.
1077
- otherwise_block : & ' a mut Option < BasicBlock > ,
1078
- /// Track places that need fake borrows.
1079
- fake_borrows : & ' a mut Option < FxIndexSet < Place < ' tcx > > > ,
1080
1076
}
1081
1077
1082
1078
impl < ' b , ' c , ' pat , ' tcx > std:: fmt:: Debug for MatchAutomatonStep < ' b , ' c , ' pat , ' tcx > {
@@ -1414,8 +1410,8 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
1414
1410
match first_candidate. match_pairs [ 0 ] . pattern . kind {
1415
1411
PatKind :: Or { .. } => ( ) ,
1416
1412
_ => {
1417
- let step = self . build_test_step ( candidates, otherwise_block , fake_borrows) ;
1418
- self . perform_test ( span, scrutinee_span, block, step) ;
1413
+ let step = self . build_test_step ( candidates, fake_borrows) ;
1414
+ self . perform_test ( span, scrutinee_span, block, otherwise_block , fake_borrows , step) ;
1419
1415
return ;
1420
1416
}
1421
1417
}
@@ -1648,8 +1644,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
1648
1644
fn build_test_step < ' pat , ' b , ' c > (
1649
1645
& mut self ,
1650
1646
mut candidates : & ' b mut [ & ' c mut Candidate < ' pat , ' tcx > ] ,
1651
- otherwise_block : & ' b mut Option < BasicBlock > ,
1652
- fake_borrows : & ' b mut Option < FxIndexSet < Place < ' tcx > > > ,
1647
+ fake_borrows : & mut Option < FxIndexSet < Place < ' tcx > > > ,
1653
1648
) -> MatchAutomatonStep < ' b , ' c , ' pat , ' tcx > {
1654
1649
// extract the match-pair from the highest priority candidate
1655
1650
let match_pair = & candidates. first ( ) . unwrap ( ) . match_pairs [ 0 ] ;
@@ -1720,8 +1715,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
1720
1715
place : match_place,
1721
1716
remaining_candidates : candidates,
1722
1717
target_candidates,
1723
- otherwise_block,
1724
- fake_borrows,
1725
1718
}
1726
1719
}
1727
1720
0 commit comments