@@ -1180,9 +1180,9 @@ pub enum TerminatorKind<'tcx> {
11801180 FalseEdges {
11811181 /// The target normal control flow will take
11821182 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
11841184 /// in practice
1185- imaginary_targets : Vec < BasicBlock > ,
1185+ imaginary_target : BasicBlock ,
11861186 } ,
11871187 /// A terminator for blocks that only take one path in reality, but where we
11881188 /// reserve the right to unwind in borrowck, even if it won't happen in practice.
@@ -1319,8 +1319,8 @@ impl<'tcx> TerminatorKind<'tcx> {
13191319 SwitchInt { ref targets, .. } => None . into_iter ( ) . chain ( & targets[ ..] ) ,
13201320 FalseEdges {
13211321 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 ) ) ,
13241324 }
13251325 }
13261326
@@ -1406,10 +1406,10 @@ impl<'tcx> TerminatorKind<'tcx> {
14061406 } => None . into_iter ( ) . chain ( & mut targets[ ..] ) ,
14071407 FalseEdges {
14081408 ref mut real_target,
1409- ref mut imaginary_targets ,
1409+ ref mut imaginary_target ,
14101410 } => Some ( real_target)
14111411 . into_iter ( )
1412- . chain ( & mut imaginary_targets [ .. ] ) ,
1412+ . chain ( slice :: from_mut ( imaginary_target ) ) ,
14131413 }
14141414 }
14151415
@@ -1712,12 +1712,9 @@ impl<'tcx> TerminatorKind<'tcx> {
17121712 Assert { cleanup : None , .. } => vec ! [ "" . into( ) ] ,
17131713 Assert { .. } => vec ! [ "success" . into( ) , "unwind" . into( ) ] ,
17141714 FalseEdges {
1715- ref imaginary_targets,
17161715 ..
17171716 } => {
1718- let mut l = vec ! [ "real" . into( ) ] ;
1719- l. resize ( imaginary_targets. len ( ) + 1 , "imaginary" . into ( ) ) ;
1720- l
1717+ vec ! [ "real" . into( ) , "imaginary" . into( ) ]
17211718 }
17221719 FalseUnwind {
17231720 unwind : Some ( _) , ..
@@ -3402,10 +3399,10 @@ impl<'tcx> TypeFoldable<'tcx> for Terminator<'tcx> {
34023399 Unreachable => Unreachable ,
34033400 FalseEdges {
34043401 real_target,
3405- ref imaginary_targets ,
3402+ imaginary_target ,
34063403 } => FalseEdges {
34073404 real_target,
3408- imaginary_targets : imaginary_targets . clone ( ) ,
3405+ imaginary_target ,
34093406 } ,
34103407 FalseUnwind {
34113408 real_target,
0 commit comments