@@ -570,24 +570,23 @@ fn transform_async_context<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
570
570
571
571
fn eliminate_get_context_call < ' tcx > ( bb_data : & mut BasicBlockData < ' tcx > ) -> Local {
572
572
let terminator = bb_data. terminator . take ( ) . unwrap ( ) ;
573
- if let TerminatorKind :: Call { args, destination, target, .. } = terminator. kind {
574
- let [ arg] = * Box :: try_from ( args) . unwrap ( ) ;
575
- let local = arg. node . place ( ) . unwrap ( ) . local ;
576
-
577
- let arg = Rvalue :: Use ( arg. node ) ;
578
- let assign = Statement {
579
- source_info : terminator. source_info ,
580
- kind : StatementKind :: Assign ( Box :: new ( ( destination, arg) ) ) ,
581
- } ;
582
- bb_data. statements . push ( assign) ;
583
- bb_data. terminator = Some ( Terminator {
584
- source_info : terminator. source_info ,
585
- kind : TerminatorKind :: Goto { target : target. unwrap ( ) } ,
586
- } ) ;
587
- local
588
- } else {
573
+ let TerminatorKind :: Call { args, destination, target, .. } = terminator. kind else {
589
574
bug ! ( ) ;
590
- }
575
+ } ;
576
+ let [ arg] = * Box :: try_from ( args) . unwrap ( ) ;
577
+ let local = arg. node . place ( ) . unwrap ( ) . local ;
578
+
579
+ let arg = Rvalue :: Use ( arg. node ) ;
580
+ let assign = Statement {
581
+ source_info : terminator. source_info ,
582
+ kind : StatementKind :: Assign ( Box :: new ( ( destination, arg) ) ) ,
583
+ } ;
584
+ bb_data. statements . push ( assign) ;
585
+ bb_data. terminator = Some ( Terminator {
586
+ source_info : terminator. source_info ,
587
+ kind : TerminatorKind :: Goto { target : target. unwrap ( ) } ,
588
+ } ) ;
589
+ local
591
590
}
592
591
593
592
#[ cfg_attr( not( debug_assertions) , allow( unused) ) ]
0 commit comments