From 8ee615561725dcd15c648ccca85c3a79cb5e3af5 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 12 Dec 2025 08:38:28 +0100 Subject: [PATCH] const-eval: always do full typed copies --- compiler/rustc_const_eval/src/const_eval/machine.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_const_eval/src/const_eval/machine.rs b/compiler/rustc_const_eval/src/const_eval/machine.rs index fccb6b171b1c2..986253b2e4148 100644 --- a/compiler/rustc_const_eval/src/const_eval/machine.rs +++ b/compiler/rustc_const_eval/src/const_eval/machine.rs @@ -408,8 +408,8 @@ impl<'tcx> interpret::Machine<'tcx> for CompileTimeMachine<'tcx> { } #[inline(always)] - fn enforce_validity(ecx: &InterpCx<'tcx, Self>, layout: TyAndLayout<'tcx>) -> bool { - ecx.tcx.sess.opts.unstable_opts.extra_const_ub_checks || layout.is_uninhabited() + fn enforce_validity(_ecx: &InterpCx<'tcx, Self>, _layout: TyAndLayout<'tcx>) -> bool { + true } fn load_mir(