File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ 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 ;
62
61
63
62
use crate :: prelude:: * ;
64
63
use cranelift_codegen:: ir:: AtomicRmwOp ;
@@ -672,12 +671,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
672
671
return ;
673
672
}
674
673
675
- if intrinsic == sym:: assert_zero_valid
676
- && !layout. might_permit_raw_init(
677
- fx,
678
- InitKind :: Zero ,
679
- fx. tcx. sess. opts. unstable_opts. strict_init_checks) {
680
-
674
+ if intrinsic == sym:: assert_zero_valid && !fx. tcx. permits_zero_init( layout) {
681
675
with_no_trimmed_paths!( {
682
676
crate :: base:: codegen_panic(
683
677
fx,
@@ -688,12 +682,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
688
682
return ;
689
683
}
690
684
691
- if intrinsic == sym:: assert_uninit_valid
692
- && !layout. might_permit_raw_init(
693
- fx,
694
- InitKind :: Uninit ,
695
- fx. tcx. sess. opts. unstable_opts. strict_init_checks) {
696
-
685
+ if intrinsic == sym:: assert_uninit_valid && !fx. tcx. permits_uninit_init( layout) {
697
686
with_no_trimmed_paths!( {
698
687
crate :: base:: codegen_panic(
699
688
fx,
You can’t perform that action at this time.
0 commit comments