Auto merge of #62674 - RalfJung:miri-abi, r=eddyb
RustIntrinsic and PlatformIntrinsic are also the same ABI as Rust r? @eddyb
This commit is contained in:
commit
9bb855cda0
1 changed files with 7 additions and 2 deletions
|
@ -280,8 +280,13 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
_ => bug!("unexpected callee ty: {:?}", instance_ty),
|
||||
}
|
||||
};
|
||||
// Rust and RustCall are compatible
|
||||
let normalize_abi = |abi| if abi == Abi::RustCall { Abi::Rust } else { abi };
|
||||
let normalize_abi = |abi| match abi {
|
||||
Abi::Rust | Abi::RustCall | Abi::RustIntrinsic | Abi::PlatformIntrinsic =>
|
||||
// These are all the same ABI, really.
|
||||
Abi::Rust,
|
||||
abi =>
|
||||
abi,
|
||||
};
|
||||
if normalize_abi(caller_abi) != normalize_abi(callee_abi) {
|
||||
return err!(FunctionAbiMismatch(caller_abi, callee_abi));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue