File tree Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -248,17 +248,13 @@ fn reuse_workproduct_for_cgu(
248
248
dwarf_object : None ,
249
249
bytecode : None ,
250
250
} ,
251
- module_global_asm : if has_global_asm {
252
- Some ( CompiledModule {
253
- name : cgu. name ( ) . to_string ( ) ,
254
- kind : ModuleKind :: Regular ,
255
- object : Some ( obj_out_global_asm) ,
256
- dwarf_object : None ,
257
- bytecode : None ,
258
- } )
259
- } else {
260
- None
261
- } ,
251
+ module_global_asm : has_global_asm. then ( || CompiledModule {
252
+ name : cgu. name ( ) . to_string ( ) ,
253
+ kind : ModuleKind :: Regular ,
254
+ object : Some ( obj_out_global_asm) ,
255
+ dwarf_object : None ,
256
+ bytecode : None ,
257
+ } ) ,
262
258
existing_work_product : Some ( ( cgu. work_product_id ( ) , work_product) ) ,
263
259
} )
264
260
}
Original file line number Diff line number Diff line change @@ -644,10 +644,14 @@ fn codegen_regular_intrinsic_call<'tcx>(
644
644
let layout = fx. layout_of ( ty) ;
645
645
let do_panic = match intrinsic {
646
646
sym:: assert_inhabited => layout. abi . is_uninhabited ( ) ,
647
- sym:: assert_zero_valid => !fx. tcx . permits_zero_init ( fx. param_env ( ) . and ( layout) ) ,
648
- sym:: assert_mem_uninitialized_valid => {
649
- !fx. tcx . permits_uninit_init ( fx. param_env ( ) . and ( layout) )
650
- }
647
+ sym:: assert_zero_valid => !fx
648
+ . tcx
649
+ . permits_zero_init ( fx. param_env ( ) . and ( ty) )
650
+ . expect ( "expected to have layout during codegen" ) ,
651
+ sym:: assert_mem_uninitialized_valid => !fx
652
+ . tcx
653
+ . permits_uninit_init ( fx. param_env ( ) . and ( ty) )
654
+ . expect ( "expected to have layout during codegen" ) ,
651
655
_ => unreachable ! ( ) ,
652
656
} ;
653
657
if do_panic {
You can’t perform that action at this time.
0 commit comments