@@ -1180,9 +1180,9 @@ pub enum TerminatorKind<'tcx> {
1180
1180
FalseEdges {
1181
1181
/// The target normal control flow will take
1182
1182
real_target : BasicBlock ,
1183
- /// The list of blocks control flow could conceptually take, but won't
1183
+ /// A block control flow could conceptually take, but won't
1184
1184
/// in practice
1185
- imaginary_targets : Vec < BasicBlock > ,
1185
+ imaginary_target : BasicBlock ,
1186
1186
} ,
1187
1187
/// A terminator for blocks that only take one path in reality, but where we
1188
1188
/// reserve the right to unwind in borrowck, even if it won't happen in practice.
@@ -1319,8 +1319,8 @@ impl<'tcx> TerminatorKind<'tcx> {
1319
1319
SwitchInt { ref targets, .. } => None . into_iter ( ) . chain ( & targets[ ..] ) ,
1320
1320
FalseEdges {
1321
1321
ref real_target,
1322
- ref imaginary_targets ,
1323
- } => Some ( real_target) . into_iter ( ) . chain ( & imaginary_targets [ .. ] ) ,
1322
+ ref imaginary_target ,
1323
+ } => Some ( real_target) . into_iter ( ) . chain ( slice :: from_ref ( imaginary_target ) ) ,
1324
1324
}
1325
1325
}
1326
1326
@@ -1406,10 +1406,10 @@ impl<'tcx> TerminatorKind<'tcx> {
1406
1406
} => None . into_iter ( ) . chain ( & mut targets[ ..] ) ,
1407
1407
FalseEdges {
1408
1408
ref mut real_target,
1409
- ref mut imaginary_targets ,
1409
+ ref mut imaginary_target ,
1410
1410
} => Some ( real_target)
1411
1411
. into_iter ( )
1412
- . chain ( & mut imaginary_targets [ .. ] ) ,
1412
+ . chain ( slice :: from_mut ( imaginary_target ) ) ,
1413
1413
}
1414
1414
}
1415
1415
@@ -1712,12 +1712,9 @@ impl<'tcx> TerminatorKind<'tcx> {
1712
1712
Assert { cleanup : None , .. } => vec ! [ "" . into( ) ] ,
1713
1713
Assert { .. } => vec ! [ "success" . into( ) , "unwind" . into( ) ] ,
1714
1714
FalseEdges {
1715
- ref imaginary_targets,
1716
1715
..
1717
1716
} => {
1718
- let mut l = vec ! [ "real" . into( ) ] ;
1719
- l. resize ( imaginary_targets. len ( ) + 1 , "imaginary" . into ( ) ) ;
1720
- l
1717
+ vec ! [ "real" . into( ) , "imaginary" . into( ) ]
1721
1718
}
1722
1719
FalseUnwind {
1723
1720
unwind : Some ( _) , ..
@@ -3402,10 +3399,10 @@ impl<'tcx> TypeFoldable<'tcx> for Terminator<'tcx> {
3402
3399
Unreachable => Unreachable ,
3403
3400
FalseEdges {
3404
3401
real_target,
3405
- ref imaginary_targets ,
3402
+ imaginary_target ,
3406
3403
} => FalseEdges {
3407
3404
real_target,
3408
- imaginary_targets : imaginary_targets . clone ( ) ,
3405
+ imaginary_target ,
3409
3406
} ,
3410
3407
FalseUnwind {
3411
3408
real_target,
0 commit comments