@@ -121,8 +121,10 @@ 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 =
125+ this. then_else_break_inner ( block, lhs, args) . unpack_block_and_unit ( ) ;
126+ let rhs_then_block =
127+ this. then_else_break_inner ( lhs_then_block, rhs, args) . unpack_block_and_unit ( ) ;
126128 rhs_then_block. unit ( )
127129 }
128130 ExprKind :: LogicalOp { op : op @ LogicalOp :: Or , lhs, rhs } => {
@@ -139,14 +141,16 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
139141 } ,
140142 )
141143 } ) ;
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- ) ) ;
144+ let rhs_success_block = this
145+ . then_else_break_inner (
146+ failure_block,
147+ rhs,
148+ ThenElseArgs {
149+ declare_let_bindings : DeclareLetBindings :: LetNotPermitted ,
150+ ..args
151+ } ,
152+ )
153+ . unpack_block_and_unit ( ) ;
150154
151155 // Make the LHS and RHS success arms converge to a common block.
152156 // (We can't just make LHS goto RHS, because `rhs_success_block`
@@ -451,7 +455,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
451455 outer_source_info : SourceInfo ,
452456 fake_borrow_temps : Vec < ( Place < ' tcx > , Local , FakeBorrowKind ) > ,
453457 ) -> BlockAnd < ( ) > {
454- let arm_end_blocks: Vec < _ > = arm_candidates
458+ let arm_end_blocks: Vec < BasicBlock > = arm_candidates
455459 . into_iter ( )
456460 . map ( |( arm, candidate) | {
457461 debug ! ( "lowering arm {:?}\n candidate = {:?}" , arm, candidate) ;
@@ -502,6 +506,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
502506
503507 this. expr_into_dest ( destination, arm_block, arm. body )
504508 } )
509+ . unpack_block_and_unit ( )
505510 } )
506511 . collect ( ) ;
507512
@@ -512,10 +517,10 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
512517 outer_source_info. span . with_lo ( outer_source_info. span . hi ( ) - BytePos :: from_usize ( 1 ) ) ,
513518 ) ;
514519 for arm_block in arm_end_blocks {
515- let block = & self . cfg . basic_blocks [ arm_block. 0 ] ;
520+ let block = & self . cfg . basic_blocks [ arm_block] ;
516521 let last_location = block. statements . last ( ) . map ( |s| s. source_info ) ;
517522
518- self . cfg . goto ( unpack ! ( arm_block) , last_location. unwrap_or ( end_brace) , end_block) ;
523+ self . cfg . goto ( arm_block, last_location. unwrap_or ( end_brace) , end_block) ;
519524 }
520525
521526 self . source_scope = outer_source_info. scope ;
0 commit comments