mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
dont rely on old macro-in-trait-impl bug
This commit is contained in:
parent
be6bb56ee0
commit
7b2a5f284e
@ -436,24 +436,12 @@ pub macro compile_time_machine(<$mir: lifetime, $tcx: lifetime>) {
|
||||
type AllocExtra = ();
|
||||
type FrameExtra = ();
|
||||
|
||||
#[inline(always)]
|
||||
fn enforce_alignment(_ecx: &InterpCx<$mir, $tcx, Self>) -> bool {
|
||||
// We do not check for alignment to avoid having to carry an `Align`
|
||||
// in `ConstValue::ByRef`.
|
||||
false
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn force_int_for_alignment_check(_ecx: &InterpCx<$mir, $tcx, Self>) -> bool {
|
||||
// We do not support `force_int`.
|
||||
false
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn enforce_validity(_ecx: &InterpCx<$mir, $tcx, Self>) -> bool {
|
||||
false // for now, we don't enforce validity
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn enforce_number_init(_ecx: &InterpCx<$mir, $tcx, Self>) -> bool {
|
||||
true
|
||||
|
@ -183,6 +183,18 @@ impl<'mir, 'tcx> interpret::Machine<'mir, 'tcx> for ConstPropMachine<'mir, 'tcx>
|
||||
|
||||
type MemoryKind = !;
|
||||
|
||||
#[inline(always)]
|
||||
fn enforce_alignment(_ecx: &InterpCx<'mir, 'tcx, Self>) -> bool {
|
||||
// We do not check for alignment to avoid having to carry an `Align`
|
||||
// in `ConstValue::ByRef`.
|
||||
false
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn enforce_validity(_ecx: &InterpCx<'mir, 'tcx, Self>) -> bool {
|
||||
false // for now, we don't enforce validity
|
||||
}
|
||||
|
||||
fn load_mir(
|
||||
_ecx: &InterpCx<'mir, 'tcx, Self>,
|
||||
_instance: ty::InstanceDef<'tcx>,
|
||||
|
Loading…
Reference in New Issue
Block a user