mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-02 15:56:09 +03:00
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:
@@ -280,8 +280,13 @@ fn eval_fn_call(
|
||||
_ => 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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user