@@ -1196,9 +1196,9 @@ pub enum TerminatorKind<'tcx> {
11961196 FalseEdges {
11971197 /// The target normal control flow will take
11981198 real_target : BasicBlock ,
1199- /// The list of blocks control flow could conceptually take, but won't
1199+ /// A block control flow could conceptually take, but won't
12001200 /// in practice
1201- imaginary_targets : Vec < BasicBlock > ,
1201+ imaginary_target : BasicBlock ,
12021202 } ,
12031203 /// A terminator for blocks that only take one path in reality, but where we
12041204 /// reserve the right to unwind in borrowck, even if it won't happen in practice.
@@ -1335,8 +1335,8 @@ impl<'tcx> TerminatorKind<'tcx> {
13351335 SwitchInt { ref targets, .. } => None . into_iter ( ) . chain ( & targets[ ..] ) ,
13361336 FalseEdges {
13371337 ref real_target,
1338- ref imaginary_targets ,
1339- } => Some ( real_target) . into_iter ( ) . chain ( & imaginary_targets [ .. ] ) ,
1338+ ref imaginary_target ,
1339+ } => Some ( real_target) . into_iter ( ) . chain ( slice :: from_ref ( imaginary_target ) ) ,
13401340 }
13411341 }
13421342
@@ -1422,10 +1422,10 @@ impl<'tcx> TerminatorKind<'tcx> {
14221422 } => None . into_iter ( ) . chain ( & mut targets[ ..] ) ,
14231423 FalseEdges {
14241424 ref mut real_target,
1425- ref mut imaginary_targets ,
1425+ ref mut imaginary_target ,
14261426 } => Some ( real_target)
14271427 . into_iter ( )
1428- . chain ( & mut imaginary_targets [ .. ] ) ,
1428+ . chain ( slice :: from_mut ( imaginary_target ) ) ,
14291429 }
14301430 }
14311431
@@ -1722,12 +1722,9 @@ impl<'tcx> TerminatorKind<'tcx> {
17221722 Assert { cleanup : None , .. } => vec ! [ "" . into( ) ] ,
17231723 Assert { .. } => vec ! [ "success" . into( ) , "unwind" . into( ) ] ,
17241724 FalseEdges {
1725- ref imaginary_targets,
17261725 ..
17271726 } => {
1728- let mut l = vec ! [ "real" . into( ) ] ;
1729- l. resize ( imaginary_targets. len ( ) + 1 , "imaginary" . into ( ) ) ;
1730- l
1727+ vec ! [ "real" . into( ) , "imaginary" . into( ) ]
17311728 }
17321729 FalseUnwind {
17331730 unwind : Some ( _) , ..
@@ -3356,10 +3353,10 @@ impl<'tcx> TypeFoldable<'tcx> for Terminator<'tcx> {
33563353 Unreachable => Unreachable ,
33573354 FalseEdges {
33583355 real_target,
3359- ref imaginary_targets ,
3356+ imaginary_target ,
33603357 } => FalseEdges {
33613358 real_target,
3362- imaginary_targets : imaginary_targets . clone ( ) ,
3359+ imaginary_target ,
33633360 } ,
33643361 FalseUnwind {
33653362 real_target,
0 commit comments