@@ -71,11 +71,11 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
71
71
StmtKind :: Expr { scope, expr } => {
72
72
this. block_context . push ( BlockFrame :: Statement { ignores_expr_result : true } ) ;
73
73
let si = ( * scope, source_info) ;
74
- unpack ! (
75
- block = this . in_scope( si, LintLevel :: Inherited , |this| {
74
+ block = this
75
+ . in_scope ( si, LintLevel :: Inherited , |this| {
76
76
this. stmt_expr ( block, * expr, Some ( * scope) )
77
77
} )
78
- ) ;
78
+ . into_block ( ) ;
79
79
}
80
80
StmtKind :: Let {
81
81
remainder_scope,
@@ -166,14 +166,14 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
166
166
let dummy_place = this. temp ( this. tcx . types . never , else_block_span) ;
167
167
let failure_entry = this. cfg . start_new_block ( ) ;
168
168
let failure_block;
169
- unpack ! (
170
- failure_block = this . ast_block(
169
+ failure_block = this
170
+ . ast_block (
171
171
dummy_place,
172
172
failure_entry,
173
173
* else_block,
174
174
this. source_info ( else_block_span) ,
175
175
)
176
- ) ;
176
+ . into_block ( ) ;
177
177
this. cfg . terminate (
178
178
failure_block,
179
179
this. source_info ( else_block_span) ,
@@ -267,8 +267,8 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
267
267
let initializer_span = this. thir [ init] . span ;
268
268
let scope = ( * init_scope, source_info) ;
269
269
270
- unpack ! (
271
- block = this . in_scope( scope, * lint_level, |this| {
270
+ block = this
271
+ . in_scope ( scope, * lint_level, |this| {
272
272
this. declare_bindings (
273
273
visibility_scope,
274
274
remainder_span,
@@ -279,7 +279,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
279
279
this. expr_into_pattern ( block, & pattern, init)
280
280
// irrefutable pattern
281
281
} )
282
- )
282
+ . into_block ( ) ;
283
283
} else {
284
284
let scope = ( * init_scope, source_info) ;
285
285
let _: BlockAnd < ( ) > = this. in_scope ( scope, * lint_level, |this| {
@@ -333,7 +333,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
333
333
this. block_context
334
334
. push ( BlockFrame :: TailExpr { tail_result_is_ignored, span : expr. span } ) ;
335
335
336
- unpack ! ( block = this. expr_into_dest( destination, block, expr_id) ) ;
336
+ block = this. expr_into_dest ( destination, block, expr_id) . into_block ( ) ;
337
337
let popped = this. block_context . pop ( ) ;
338
338
339
339
assert ! ( popped. is_some_and( |bf| bf. is_tail_expr( ) ) ) ;
@@ -355,7 +355,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
355
355
// Finally, we pop all the let scopes before exiting out from the scope of block
356
356
// itself.
357
357
for scope in let_scope_stack. into_iter ( ) . rev ( ) {
358
- unpack ! ( block = this. pop_scope( ( * scope, source_info) , block) ) ;
358
+ block = this. pop_scope ( ( * scope, source_info) , block) . into_block ( ) ;
359
359
}
360
360
// Restore the original source scope.
361
361
this. source_scope = outer_source_scope;
0 commit comments