@@ -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;
@@ -886,28 +885,15 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
886
885
const PANIC_ON_ALLOC_FAIL : bool = false ;
887
886
888
887
#[ inline( always) ]
889
- fn enforce_alignment ( ecx : & MiriInterpCx < ' mir , ' tcx > ) -> CheckAlignment {
890
- if ecx. machine . check_alignment == AlignmentCheck :: None {
891
- CheckAlignment :: No
892
- } else {
893
- CheckAlignment :: Error
894
- }
888
+ fn enforce_alignment ( ecx : & MiriInterpCx < ' mir , ' tcx > ) -> bool {
889
+ ecx. machine . check_alignment != AlignmentCheck :: None
895
890
}
896
891
897
892
#[ inline( always) ]
898
893
fn use_addr_for_alignment_check ( ecx : & MiriInterpCx < ' mir , ' tcx > ) -> bool {
899
894
ecx. machine . check_alignment == AlignmentCheck :: Int
900
895
}
901
896
902
- fn alignment_check_failed (
903
- _ecx : & InterpCx < ' mir , ' tcx , Self > ,
904
- has : Align ,
905
- required : Align ,
906
- _check : CheckAlignment ,
907
- ) -> InterpResult < ' tcx , ( ) > {
908
- throw_ub ! ( AlignmentCheckFailed { has, required } )
909
- }
910
-
911
897
#[ inline( always) ]
912
898
fn enforce_validity ( ecx : & MiriInterpCx < ' mir , ' tcx > , _layout : TyAndLayout < ' tcx > ) -> bool {
913
899
ecx. machine . validate
0 commit comments