File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ pub(crate) use llvm::codegen_llvm_intrinsic_call;
5858use rustc_middle:: ty:: print:: with_no_trimmed_paths;
5959use rustc_middle:: ty:: subst:: SubstsRef ;
6060use rustc_span:: symbol:: { kw, sym, Symbol } ;
61+ use rustc_target:: abi:: InitKind ;
6162
6263use crate :: prelude:: * ;
6364use cranelift_codegen:: ir:: AtomicRmwOp ;
@@ -671,7 +672,12 @@ fn codegen_regular_intrinsic_call<'tcx>(
671672 return ;
672673 }
673674
674- if intrinsic == sym:: assert_zero_valid && !layout. might_permit_raw_init( fx, /*zero:*/ true ) {
675+ if intrinsic == sym:: assert_zero_valid
676+ && !layout. might_permit_raw_init(
677+ fx,
678+ InitKind :: Zero ,
679+ fx. tcx. sess. opts. debugging_opts. strict_init_checks) {
680+
675681 with_no_trimmed_paths!( {
676682 crate :: base:: codegen_panic(
677683 fx,
@@ -682,7 +688,12 @@ fn codegen_regular_intrinsic_call<'tcx>(
682688 return ;
683689 }
684690
685- if intrinsic == sym:: assert_uninit_valid && !layout. might_permit_raw_init( fx, /*zero:*/ false ) {
691+ if intrinsic == sym:: assert_uninit_valid
692+ && !layout. might_permit_raw_init(
693+ fx,
694+ InitKind :: Uninit ,
695+ fx. tcx. sess. opts. debugging_opts. strict_init_checks) {
696+
686697 with_no_trimmed_paths!( {
687698 crate :: base:: codegen_panic(
688699 fx,
You can’t perform that action at this time.
0 commit comments