From: Ralf Jung Date: Sun, 14 Jul 2019 09:58:12 +0000 (+0200) Subject: RustIntrinsic and PlatformIntrinsic are also the same ABI as Rust X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=26528b969f74e6a4fa1799cac24058879aa57bc4;p=rust.git RustIntrinsic and PlatformIntrinsic are also the same ABI as Rust --- diff --git a/src/librustc_mir/interpret/terminator.rs b/src/librustc_mir/interpret/terminator.rs index c11e5e11923..4813186ac6e 100644 --- a/src/librustc_mir/interpret/terminator.rs +++ b/src/librustc_mir/interpret/terminator.rs @@ -281,7 +281,13 @@ fn eval_fn_call( } }; // 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)); }