Add default implementation for enforce_abi()
This commit is contained in:
parent
c69fba929b
commit
7e42c975b9
1 changed files with 3 additions and 6 deletions
|
@ -133,7 +133,9 @@ pub trait Machine<'mir, 'tcx>: Sized {
|
||||||
fn enforce_validity(ecx: &InterpCx<'mir, 'tcx, Self>) -> bool;
|
fn enforce_validity(ecx: &InterpCx<'mir, 'tcx, Self>) -> bool;
|
||||||
|
|
||||||
/// Whether function calls should be [ABI](Abi)-checked.
|
/// Whether function calls should be [ABI](Abi)-checked.
|
||||||
fn enforce_abi(ecx: &InterpCx<'mir, 'tcx, Self>) -> bool;
|
fn enforce_abi(_ecx: &InterpCx<'mir, 'tcx, Self>) -> bool {
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
/// Entry point for obtaining the MIR of anything that should get evaluated.
|
/// Entry point for obtaining the MIR of anything that should get evaluated.
|
||||||
/// So not just functions and shims, but also const/static initializers, anonymous
|
/// So not just functions and shims, but also const/static initializers, anonymous
|
||||||
|
@ -447,11 +449,6 @@ pub macro compile_time_machine(<$mir: lifetime, $tcx: lifetime>) {
|
||||||
false // for now, we don't enforce validity
|
false // for now, we don't enforce validity
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
|
||||||
fn enforce_abi(_ecx: &InterpCx<$mir, $tcx, Self>) -> bool {
|
|
||||||
true
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn call_extra_fn(
|
fn call_extra_fn(
|
||||||
_ecx: &mut InterpCx<$mir, $tcx, Self>,
|
_ecx: &mut InterpCx<$mir, $tcx, Self>,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue