File tree 1 file changed +13
-2
lines changed
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;
58
58
use rustc_middle:: ty:: print:: with_no_trimmed_paths;
59
59
use rustc_middle:: ty:: subst:: SubstsRef ;
60
60
use rustc_span:: symbol:: { kw, sym, Symbol } ;
61
+ use rustc_target:: abi:: InitKind ;
61
62
62
63
use crate :: prelude:: * ;
63
64
use cranelift_codegen:: ir:: AtomicRmwOp ;
@@ -671,7 +672,12 @@ fn codegen_regular_intrinsic_call<'tcx>(
671
672
return ;
672
673
}
673
674
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
+
675
681
with_no_trimmed_paths!( {
676
682
crate :: base:: codegen_panic(
677
683
fx,
@@ -682,7 +688,12 @@ fn codegen_regular_intrinsic_call<'tcx>(
682
688
return ;
683
689
}
684
690
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
+
686
697
with_no_trimmed_paths!( {
687
698
crate :: base:: codegen_panic(
688
699
fx,
You can’t perform that action at this time.
0 commit comments