Skip to content

Commit 73d5a30

Browse files
authored
Rollup merge of #109435 - oli-obk:🇨🇭🥚_copy_op, r=RalfJung
Detect uninhabited types early in const eval r? `@RalfJung` implements rust-lang/rust#108442 (comment) this is a breaking change, as some UB during const eval is now detected instead of silently being ignored. Users can see this and other UB that may cause future breakage with `-Zextra-const-ub-checks` or just by running miri on their code, which sets that flag by default.
2 parents e227cda + 6da4383 commit 73d5a30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/machine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
812812
}
813813

814814
#[inline(always)]
815-
fn enforce_validity(ecx: &MiriInterpCx<'mir, 'tcx>) -> bool {
815+
fn enforce_validity(ecx: &MiriInterpCx<'mir, 'tcx>, _layout: TyAndLayout<'tcx>) -> bool {
816816
ecx.machine.validate
817817
}
818818

0 commit comments

Comments
 (0)