@@ -12,7 +12,6 @@ use rand::rngs::StdRng;
12
12
use rand:: SeedableRng ;
13
13
14
14
use rustc_ast:: ast:: Mutability ;
15
- use rustc_const_eval:: const_eval:: CheckAlignment ;
16
15
use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
17
16
#[ allow( unused) ]
18
17
use rustc_data_structures:: static_assert_size;
@@ -885,28 +884,15 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
885
884
const PANIC_ON_ALLOC_FAIL : bool = false ;
886
885
887
886
#[ 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
894
889
}
895
890
896
891
#[ inline( always) ]
897
892
fn use_addr_for_alignment_check ( ecx : & MiriInterpCx < ' mir , ' tcx > ) -> bool {
898
893
ecx. machine . check_alignment == AlignmentCheck :: Int
899
894
}
900
895
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
-
910
896
#[ inline( always) ]
911
897
fn enforce_validity ( ecx : & MiriInterpCx < ' mir , ' tcx > , _layout : TyAndLayout < ' tcx > ) -> bool {
912
898
ecx. machine . validate
0 commit comments