@@ -230,11 +230,11 @@ fn split_block(
230230 let block_data = & mut basic_blocks[ location. block ] ;
231231
232232 // Drain every statement after this one and move the current terminator to a new basic block.
233- let new_block = BasicBlockData {
234- statements : block_data. statements . split_off ( location. statement_index ) ,
235- terminator : block_data. terminator . take ( ) ,
236- is_cleanup : block_data. is_cleanup ,
237- } ;
233+ let new_block = BasicBlockData :: new_stmts (
234+ block_data. statements . split_off ( location. statement_index ) ,
235+ block_data. terminator . take ( ) ,
236+ block_data. is_cleanup ,
237+ ) ;
238238
239239 basic_blocks. push ( new_block)
240240}
@@ -270,10 +270,9 @@ fn insert_discr_cast_to_u128<'tcx>(
270270 let mu_array =
271271 local_decls. push ( LocalDecl :: with_source_info ( mu_array_ty, source_info) ) . into ( ) ;
272272 let rvalue = Rvalue :: Cast ( CastKind :: Transmute , source_op, mu_array_ty) ;
273- block_data. statements . push ( Statement {
274- source_info,
275- kind : StatementKind :: Assign ( Box :: new ( ( mu_array, rvalue) ) ) ,
276- } ) ;
273+ block_data
274+ . statements
275+ . push ( Statement :: new ( source_info, StatementKind :: Assign ( Box :: new ( ( mu_array, rvalue) ) ) ) ) ;
277276
278277 // Index into the array of MaybeUninit to get something that is actually
279278 // as wide as the discriminant.
@@ -294,10 +293,10 @@ fn insert_discr_cast_to_u128<'tcx>(
294293 let op_as_int =
295294 local_decls. push ( LocalDecl :: with_source_info ( operand_int_ty, source_info) ) . into ( ) ;
296295 let rvalue = Rvalue :: Cast ( CastKind :: Transmute , source_op, operand_int_ty) ;
297- block_data. statements . push ( Statement {
296+ block_data. statements . push ( Statement :: new (
298297 source_info,
299- kind : StatementKind :: Assign ( Box :: new ( ( op_as_int, rvalue) ) ) ,
300- } ) ;
298+ StatementKind :: Assign ( Box :: new ( ( op_as_int, rvalue) ) ) ,
299+ ) ) ;
301300
302301 ( CastKind :: IntToInt , Operand :: Copy ( op_as_int) )
303302 } ;
@@ -306,18 +305,18 @@ fn insert_discr_cast_to_u128<'tcx>(
306305 let rvalue = Rvalue :: Cast ( cast_kind, discr_ty_bits, discr. ty ) ;
307306 let discr_in_discr_ty =
308307 local_decls. push ( LocalDecl :: with_source_info ( discr. ty , source_info) ) . into ( ) ;
309- block_data. statements . push ( Statement {
308+ block_data. statements . push ( Statement :: new (
310309 source_info,
311- kind : StatementKind :: Assign ( Box :: new ( ( discr_in_discr_ty, rvalue) ) ) ,
312- } ) ;
310+ StatementKind :: Assign ( Box :: new ( ( discr_in_discr_ty, rvalue) ) ) ,
311+ ) ) ;
313312
314313 // Cast the discriminant to a u128 (base for comparisions of enum discriminants).
315314 let const_u128 = Ty :: new_uint ( tcx, ty:: UintTy :: U128 ) ;
316315 let rvalue = Rvalue :: Cast ( CastKind :: IntToInt , Operand :: Copy ( discr_in_discr_ty) , const_u128) ;
317316 let discr = local_decls. push ( LocalDecl :: with_source_info ( const_u128, source_info) ) . into ( ) ;
318317 block_data
319318 . statements
320- . push ( Statement { source_info, kind : StatementKind :: Assign ( Box :: new ( ( discr, rvalue) ) ) } ) ;
319+ . push ( Statement :: new ( source_info, StatementKind :: Assign ( Box :: new ( ( discr, rvalue) ) ) ) ) ;
321320
322321 discr
323322}
@@ -390,17 +389,17 @@ fn insert_uninhabited_enum_check<'tcx>(
390389) {
391390 let is_ok: Place < ' _ > =
392391 local_decls. push ( LocalDecl :: with_source_info ( tcx. types . bool , source_info) ) . into ( ) ;
393- block_data. statements . push ( Statement {
392+ block_data. statements . push ( Statement :: new (
394393 source_info,
395- kind : StatementKind :: Assign ( Box :: new ( (
394+ StatementKind :: Assign ( Box :: new ( (
396395 is_ok,
397396 Rvalue :: Use ( Operand :: Constant ( Box :: new ( ConstOperand {
398397 span : source_info. span ,
399398 user_ty : None ,
400399 const_ : Const :: Val ( ConstValue :: from_bool ( false ) , tcx. types . bool ) ,
401400 } ) ) ) ,
402401 ) ) ) ,
403- } ) ;
402+ ) ) ;
404403
405404 block_data. terminator = Some ( Terminator {
406405 source_info,
@@ -463,27 +462,27 @@ fn insert_niche_check<'tcx>(
463462
464463 let discr_diff: Place < ' _ > =
465464 local_decls. push ( LocalDecl :: with_source_info ( tcx. types . u128 , source_info) ) . into ( ) ;
466- block_data. statements . push ( Statement {
465+ block_data. statements . push ( Statement :: new (
467466 source_info,
468- kind : StatementKind :: Assign ( Box :: new ( (
467+ StatementKind :: Assign ( Box :: new ( (
469468 discr_diff,
470469 Rvalue :: BinaryOp ( BinOp :: Sub , Box :: new ( ( Operand :: Copy ( discr) , start_const) ) ) ,
471470 ) ) ) ,
472- } ) ;
471+ ) ) ;
473472
474473 let is_ok: Place < ' _ > =
475474 local_decls. push ( LocalDecl :: with_source_info ( tcx. types . bool , source_info) ) . into ( ) ;
476- block_data. statements . push ( Statement {
475+ block_data. statements . push ( Statement :: new (
477476 source_info,
478- kind : StatementKind :: Assign ( Box :: new ( (
477+ StatementKind :: Assign ( Box :: new ( (
479478 is_ok,
480479 Rvalue :: BinaryOp (
481480 // This is a `WrappingRange`, so make sure to get the wrapping right.
482481 BinOp :: Le ,
483482 Box :: new ( ( Operand :: Copy ( discr_diff) , end_start_diff_const) ) ,
484483 ) ,
485484 ) ) ) ,
486- } ) ;
485+ ) ) ;
487486
488487 block_data. terminator = Some ( Terminator {
489488 source_info,
0 commit comments