Skip to content

Commit 7f0d71f

Browse files
committed
Auto merge of #3121 - rust-lang:rustup-2023-10-14, r=saethlin
Automatic sync from rustc
2 parents d06a41b + 85a894f commit 7f0d71f

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3d575a2f2ef8a6eb99064bb31c16feb8d508f1ee
1+
2a7c2df506fcd5611967a203cc994da5f21abd1e

src/machine.rs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use rand::rngs::StdRng;
1212
use rand::SeedableRng;
1313

1414
use rustc_ast::ast::Mutability;
15-
use rustc_const_eval::const_eval::CheckAlignment;
1615
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
1716
#[allow(unused)]
1817
use rustc_data_structures::static_assert_size;
@@ -885,28 +884,15 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
885884
const PANIC_ON_ALLOC_FAIL: bool = false;
886885

887886
#[inline(always)]
888-
fn enforce_alignment(ecx: &MiriInterpCx<'mir, 'tcx>) -> CheckAlignment {
889-
if ecx.machine.check_alignment == AlignmentCheck::None {
890-
CheckAlignment::No
891-
} else {
892-
CheckAlignment::Error
893-
}
887+
fn enforce_alignment(ecx: &MiriInterpCx<'mir, 'tcx>) -> bool {
888+
ecx.machine.check_alignment != AlignmentCheck::None
894889
}
895890

896891
#[inline(always)]
897892
fn use_addr_for_alignment_check(ecx: &MiriInterpCx<'mir, 'tcx>) -> bool {
898893
ecx.machine.check_alignment == AlignmentCheck::Int
899894
}
900895

901-
fn alignment_check_failed(
902-
_ecx: &InterpCx<'mir, 'tcx, Self>,
903-
has: Align,
904-
required: Align,
905-
_check: CheckAlignment,
906-
) -> InterpResult<'tcx, ()> {
907-
throw_ub!(AlignmentCheckFailed { has, required })
908-
}
909-
910896
#[inline(always)]
911897
fn enforce_validity(ecx: &MiriInterpCx<'mir, 'tcx>, _layout: TyAndLayout<'tcx>) -> bool {
912898
ecx.machine.validate

0 commit comments

Comments
 (0)