Skip to content

Commit 8ee6155

Browse files
committed
const-eval: always do full typed copies
1 parent f520900 commit 8ee6155

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_const_eval/src/const_eval

1 file changed

+2
-2
lines changed

compiler/rustc_const_eval/src/const_eval/machine.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,8 @@ impl<'tcx> interpret::Machine<'tcx> for CompileTimeMachine<'tcx> {
408408
}
409409

410410
#[inline(always)]
411-
fn enforce_validity(ecx: &InterpCx<'tcx, Self>, layout: TyAndLayout<'tcx>) -> bool {
412-
ecx.tcx.sess.opts.unstable_opts.extra_const_ub_checks || layout.is_uninhabited()
411+
fn enforce_validity(_ecx: &InterpCx<'tcx, Self>, _layout: TyAndLayout<'tcx>) -> bool {
412+
true
413413
}
414414

415415
fn load_mir(

0 commit comments

Comments
 (0)