]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_const_eval/src/might_permit_raw_init.rs
fix ICE with extra-const-ub-checks
[rust.git] / compiler / rustc_const_eval / src / might_permit_raw_init.rs
index f971c2238c7bbec27afa577af641142bdbd24f9c..37ffa19ccd6b9d7097c431545641129fdac547b6 100644 (file)
@@ -13,7 +13,11 @@ pub fn might_permit_raw_init<'tcx>(
     let strict = tcx.sess.opts.unstable_opts.strict_init_checks;
 
     if strict {
-        let machine = CompileTimeInterpreter::new(Limit::new(0), false);
+        let machine = CompileTimeInterpreter::new(
+            Limit::new(0),
+            /*can_access_statics:*/ false,
+            /*check_alignment:*/ true,
+        );
 
         let mut cx = InterpCx::new(tcx, rustc_span::DUMMY_SP, ParamEnv::reveal_all(), machine);