Skip to content

Commit db4e1d2

Browse files
Auto merge of #149901 - RalfJung:const-eval-typed, r=<try>
const-eval: always do full typed copies
2 parents 5b150d2 + 8ee6155 commit db4e1d2

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)