@@ -71,11 +71,11 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
7171 StmtKind :: Expr { scope, expr } => {
7272 this. block_context . push ( BlockFrame :: Statement { ignores_expr_result : true } ) ;
7373 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| {
7676 this. stmt_expr ( block, * expr, Some ( * scope) )
7777 } )
78- ) ;
78+ . into_block ( ) ;
7979 }
8080 StmtKind :: Let {
8181 remainder_scope,
@@ -166,14 +166,14 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
166166 let dummy_place = this. temp ( this. tcx . types . never , else_block_span) ;
167167 let failure_entry = this. cfg . start_new_block ( ) ;
168168 let failure_block;
169- unpack ! (
170- failure_block = this . ast_block(
169+ failure_block = this
170+ . ast_block (
171171 dummy_place,
172172 failure_entry,
173173 * else_block,
174174 this. source_info ( else_block_span) ,
175175 )
176- ) ;
176+ . into_block ( ) ;
177177 this. cfg . terminate (
178178 failure_block,
179179 this. source_info ( else_block_span) ,
@@ -267,8 +267,8 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
267267 let initializer_span = this. thir [ init] . span ;
268268 let scope = ( * init_scope, source_info) ;
269269
270- unpack ! (
271- block = this . in_scope( scope, * lint_level, |this| {
270+ block = this
271+ . in_scope ( scope, * lint_level, |this| {
272272 this. declare_bindings (
273273 visibility_scope,
274274 remainder_span,
@@ -279,7 +279,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
279279 this. expr_into_pattern ( block, & pattern, init)
280280 // irrefutable pattern
281281 } )
282- )
282+ . into_block ( ) ;
283283 } else {
284284 let scope = ( * init_scope, source_info) ;
285285 let _: BlockAnd < ( ) > = this. in_scope ( scope, * lint_level, |this| {
@@ -333,7 +333,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
333333 this. block_context
334334 . push ( BlockFrame :: TailExpr { tail_result_is_ignored, span : expr. span } ) ;
335335
336- unpack ! ( block = this. expr_into_dest( destination, block, expr_id) ) ;
336+ block = this. expr_into_dest ( destination, block, expr_id) . into_block ( ) ;
337337 let popped = this. block_context . pop ( ) ;
338338
339339 assert ! ( popped. is_some_and( |bf| bf. is_tail_expr( ) ) ) ;
@@ -355,7 +355,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
355355 // Finally, we pop all the let scopes before exiting out from the scope of block
356356 // itself.
357357 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 ( ) ;
359359 }
360360 // Restore the original source scope.
361361 this. source_scope = outer_source_scope;
0 commit comments