@@ -1468,21 +1468,23 @@ impl<'tcx> TerminatorKind<'tcx> {
1468
1468
/// successors, which may be rendered differently between the text and the graphviz format.
1469
1469
pub fn fmt_head < W : Write > ( & self , fmt : & mut W ) -> fmt:: Result {
1470
1470
use self :: TerminatorKind :: * ;
1471
- match * self {
1471
+ match self {
1472
1472
Goto { .. } => write ! ( fmt, "goto" ) ,
1473
- SwitchInt { discr : ref place , .. } => write ! ( fmt, "switchInt({:?})" , place ) ,
1473
+ SwitchInt { discr, .. } => write ! ( fmt, "switchInt({:?})" , discr ) ,
1474
1474
Return => write ! ( fmt, "return" ) ,
1475
1475
GeneratorDrop => write ! ( fmt, "generator_drop" ) ,
1476
1476
Resume => write ! ( fmt, "resume" ) ,
1477
1477
Abort => write ! ( fmt, "abort" ) ,
1478
- Yield { ref value, .. } => write ! ( fmt, "_1 = suspend({:?})" , value) ,
1478
+ Yield { value, resume_arg, .. } => {
1479
+ write ! ( fmt, "{:?} = suspend({:?})" , resume_arg, value)
1480
+ }
1479
1481
Unreachable => write ! ( fmt, "unreachable" ) ,
1480
- Drop { ref location, .. } => write ! ( fmt, "drop({:?})" , location) ,
1481
- DropAndReplace { ref location, ref value, .. } => {
1482
+ Drop { location, .. } => write ! ( fmt, "drop({:?})" , location) ,
1483
+ DropAndReplace { location, value, .. } => {
1482
1484
write ! ( fmt, "replace({:?} <- {:?})" , location, value)
1483
1485
}
1484
- Call { ref func, ref args, ref destination, .. } => {
1485
- if let Some ( ( ref destination, _) ) = * destination {
1486
+ Call { func, args, destination, .. } => {
1487
+ if let Some ( ( destination, _) ) = destination {
1486
1488
write ! ( fmt, "{:?} = " , destination) ?;
1487
1489
}
1488
1490
write ! ( fmt, "{:?}(" , func) ?;
@@ -1494,7 +1496,7 @@ impl<'tcx> TerminatorKind<'tcx> {
1494
1496
}
1495
1497
write ! ( fmt, ")" )
1496
1498
}
1497
- Assert { ref cond, expected, ref msg, .. } => {
1499
+ Assert { cond, expected, msg, .. } => {
1498
1500
write ! ( fmt, "assert(" ) ?;
1499
1501
if !expected {
1500
1502
write ! ( fmt, "!" ) ?;
0 commit comments