@@ -1185,9 +1185,9 @@ pub enum TerminatorKind<'tcx> {
11851185 FalseEdges {
11861186 /// The target normal control flow will take
11871187 real_target : BasicBlock ,
1188- /// The list of blocks control flow could conceptually take, but won't
1188+ /// A block control flow could conceptually take, but won't
11891189 /// in practice
1190- imaginary_targets : Vec < BasicBlock > ,
1190+ imaginary_target : BasicBlock ,
11911191 } ,
11921192 /// A terminator for blocks that only take one path in reality, but where we
11931193 /// reserve the right to unwind in borrowck, even if it won't happen in practice.
@@ -1324,8 +1324,8 @@ impl<'tcx> TerminatorKind<'tcx> {
13241324 SwitchInt { ref targets, .. } => None . into_iter ( ) . chain ( & targets[ ..] ) ,
13251325 FalseEdges {
13261326 ref real_target,
1327- ref imaginary_targets ,
1328- } => Some ( real_target) . into_iter ( ) . chain ( & imaginary_targets [ .. ] ) ,
1327+ ref imaginary_target ,
1328+ } => Some ( real_target) . into_iter ( ) . chain ( slice :: from_ref ( imaginary_target ) ) ,
13291329 }
13301330 }
13311331
@@ -1411,10 +1411,10 @@ impl<'tcx> TerminatorKind<'tcx> {
14111411 } => None . into_iter ( ) . chain ( & mut targets[ ..] ) ,
14121412 FalseEdges {
14131413 ref mut real_target,
1414- ref mut imaginary_targets ,
1414+ ref mut imaginary_target ,
14151415 } => Some ( real_target)
14161416 . into_iter ( )
1417- . chain ( & mut imaginary_targets [ .. ] ) ,
1417+ . chain ( slice :: from_mut ( imaginary_target ) ) ,
14181418 }
14191419 }
14201420
@@ -1714,12 +1714,9 @@ impl<'tcx> TerminatorKind<'tcx> {
17141714 Assert { cleanup : None , .. } => vec ! [ "" . into( ) ] ,
17151715 Assert { .. } => vec ! [ "success" . into( ) , "unwind" . into( ) ] ,
17161716 FalseEdges {
1717- ref imaginary_targets,
17181717 ..
17191718 } => {
1720- let mut l = vec ! [ "real" . into( ) ] ;
1721- l. resize ( imaginary_targets. len ( ) + 1 , "imaginary" . into ( ) ) ;
1722- l
1719+ vec ! [ "real" . into( ) , "imaginary" . into( ) ]
17231720 }
17241721 FalseUnwind {
17251722 unwind : Some ( _) , ..
@@ -3342,10 +3339,10 @@ impl<'tcx> TypeFoldable<'tcx> for Terminator<'tcx> {
33423339 Unreachable => Unreachable ,
33433340 FalseEdges {
33443341 real_target,
3345- ref imaginary_targets ,
3342+ imaginary_target ,
33463343 } => FalseEdges {
33473344 real_target,
3348- imaginary_targets : imaginary_targets . clone ( ) ,
3345+ imaginary_target ,
33493346 } ,
33503347 FalseUnwind {
33513348 real_target,
0 commit comments