@@ -121,8 +121,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
121121 match expr. kind {
122122 ExprKind :: LogicalOp { op : op @ LogicalOp :: And , lhs, rhs } => {
123123 this. visit_coverage_branch_operation ( op, expr_span) ;
124- let lhs_then_block = unpack ! ( this. then_else_break_inner( block, lhs, args) ) ;
125- let rhs_then_block = unpack ! ( this. then_else_break_inner( lhs_then_block, rhs, args) ) ;
124+ let lhs_then_block = this. then_else_break_inner ( block, lhs, args) . into_block ( ) ;
125+ let rhs_then_block =
126+ this. then_else_break_inner ( lhs_then_block, rhs, args) . into_block ( ) ;
126127 rhs_then_block. unit ( )
127128 }
128129 ExprKind :: LogicalOp { op : op @ LogicalOp :: Or , lhs, rhs } => {
@@ -139,14 +140,16 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
139140 } ,
140141 )
141142 } ) ;
142- let rhs_success_block = unpack ! ( this. then_else_break_inner(
143- failure_block,
144- rhs,
145- ThenElseArgs {
146- declare_let_bindings: DeclareLetBindings :: LetNotPermitted ,
147- ..args
148- } ,
149- ) ) ;
143+ let rhs_success_block = this
144+ . then_else_break_inner (
145+ failure_block,
146+ rhs,
147+ ThenElseArgs {
148+ declare_let_bindings : DeclareLetBindings :: LetNotPermitted ,
149+ ..args
150+ } ,
151+ )
152+ . into_block ( ) ;
150153
151154 // Make the LHS and RHS success arms converge to a common block.
152155 // (We can't just make LHS goto RHS, because `rhs_success_block`
@@ -451,7 +454,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
451454 outer_source_info : SourceInfo ,
452455 fake_borrow_temps : Vec < ( Place < ' tcx > , Local , FakeBorrowKind ) > ,
453456 ) -> BlockAnd < ( ) > {
454- let arm_end_blocks: Vec < _ > = arm_candidates
457+ let arm_end_blocks: Vec < BasicBlock > = arm_candidates
455458 . into_iter ( )
456459 . map ( |( arm, candidate) | {
457460 debug ! ( "lowering arm {:?}\n candidate = {:?}" , arm, candidate) ;
@@ -502,6 +505,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
502505
503506 this. expr_into_dest ( destination, arm_block, arm. body )
504507 } )
508+ . into_block ( )
505509 } )
506510 . collect ( ) ;
507511
@@ -512,10 +516,10 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
512516 outer_source_info. span . with_lo ( outer_source_info. span . hi ( ) - BytePos :: from_usize ( 1 ) ) ,
513517 ) ;
514518 for arm_block in arm_end_blocks {
515- let block = & self . cfg . basic_blocks [ arm_block. 0 ] ;
519+ let block = & self . cfg . basic_blocks [ arm_block] ;
516520 let last_location = block. statements . last ( ) . map ( |s| s. source_info ) ;
517521
518- self . cfg . goto ( unpack ! ( arm_block) , last_location. unwrap_or ( end_brace) , end_block) ;
522+ self . cfg . goto ( arm_block, last_location. unwrap_or ( end_brace) , end_block) ;
519523 }
520524
521525 self . source_scope = outer_source_info. scope ;
0 commit comments