@@ -416,32 +416,36 @@ impl<'tcx> TerminatorKind<'tcx> {
416
416
| Return
417
417
| Unreachable
418
418
| Call { destination : None , cleanup : None , .. }
419
- | InlineAsm { destination : None , cleanup : None , .. } => None . into_iter ( ) . chain ( & [ ] ) ,
420
- Goto { target : ref t }
421
- | Call { destination : None , cleanup : Some ( ref t) , .. }
422
- | Call { destination : Some ( ( _, ref t) ) , cleanup : None , .. }
423
- | Yield { resume : ref t, drop : None , .. }
424
- | DropAndReplace { target : ref t, unwind : None , .. }
425
- | Drop { target : ref t, unwind : None , .. }
426
- | Assert { target : ref t, cleanup : None , .. }
427
- | FalseUnwind { real_target : ref t, unwind : None }
428
- | InlineAsm { destination : Some ( ref t) , cleanup : None , .. }
429
- | InlineAsm { destination : None , cleanup : Some ( ref t) , .. } => {
430
- Some ( t) . into_iter ( ) . chain ( & [ ] )
419
+ | InlineAsm { destination : None , cleanup : None , .. } => {
420
+ None . into_iter ( ) . chain ( ( & [ ] ) . into_iter ( ) . copied ( ) )
431
421
}
432
- Call { destination : Some ( ( _, ref t) ) , cleanup : Some ( ref u) , .. }
433
- | Yield { resume : ref t, drop : Some ( ref u) , .. }
434
- | DropAndReplace { target : ref t, unwind : Some ( ref u) , .. }
435
- | Drop { target : ref t, unwind : Some ( ref u) , .. }
436
- | Assert { target : ref t, cleanup : Some ( ref u) , .. }
437
- | FalseUnwind { real_target : ref t, unwind : Some ( ref u) }
438
- | InlineAsm { destination : Some ( ref t) , cleanup : Some ( ref u) , .. } => {
439
- Some ( t) . into_iter ( ) . chain ( slice:: from_ref ( u) )
422
+ Goto { target : t }
423
+ | Call { destination : None , cleanup : Some ( t) , .. }
424
+ | Call { destination : Some ( ( _, t) ) , cleanup : None , .. }
425
+ | Yield { resume : t, drop : None , .. }
426
+ | DropAndReplace { target : t, unwind : None , .. }
427
+ | Drop { target : t, unwind : None , .. }
428
+ | Assert { target : t, cleanup : None , .. }
429
+ | FalseUnwind { real_target : t, unwind : None }
430
+ | InlineAsm { destination : Some ( t) , cleanup : None , .. }
431
+ | InlineAsm { destination : None , cleanup : Some ( t) , .. } => {
432
+ Some ( t) . into_iter ( ) . chain ( ( & [ ] ) . into_iter ( ) . copied ( ) )
440
433
}
441
- SwitchInt { ref targets, .. } => None . into_iter ( ) . chain ( & targets. targets ) ,
442
- FalseEdge { ref real_target, ref imaginary_target } => {
443
- Some ( real_target) . into_iter ( ) . chain ( slice:: from_ref ( imaginary_target) )
434
+ Call { destination : Some ( ( _, t) ) , cleanup : Some ( ref u) , .. }
435
+ | Yield { resume : t, drop : Some ( ref u) , .. }
436
+ | DropAndReplace { target : t, unwind : Some ( ref u) , .. }
437
+ | Drop { target : t, unwind : Some ( ref u) , .. }
438
+ | Assert { target : t, cleanup : Some ( ref u) , .. }
439
+ | FalseUnwind { real_target : t, unwind : Some ( ref u) }
440
+ | InlineAsm { destination : Some ( t) , cleanup : Some ( ref u) , .. } => {
441
+ Some ( t) . into_iter ( ) . chain ( slice:: from_ref ( u) . into_iter ( ) . copied ( ) )
444
442
}
443
+ SwitchInt { ref targets, .. } => {
444
+ None . into_iter ( ) . chain ( targets. targets . iter ( ) . copied ( ) )
445
+ }
446
+ FalseEdge { real_target, ref imaginary_target } => Some ( real_target)
447
+ . into_iter ( )
448
+ . chain ( slice:: from_ref ( imaginary_target) . into_iter ( ) . copied ( ) ) ,
445
449
}
446
450
}
447
451
0 commit comments