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:
bors
2019-07-15 05:40:41 +00:00
+7 -2
View File
@@ -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));
}