Skip to content

Commit 26528b9

Browse files
committed
RustIntrinsic and PlatformIntrinsic are also the same ABI as Rust
1 parent fa6b706 commit 26528b9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/librustc_mir/interpret/terminator.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,13 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
281281
}
282282
};
283283
// Rust and RustCall are compatible
284-
let normalize_abi = |abi| if abi == Abi::RustCall { Abi::Rust } else { abi };
284+
let normalize_abi = |abi| match abi {
285+
Abi::Rust | Abi::RustCall | Abi::RustIntrinsic | Abi::PlatformIntrinsic =>
286+
// These are all the same ABI, really.
287+
Abi::Rust,
288+
abi =>
289+
abi,
290+
};
285291
if normalize_abi(caller_abi) != normalize_abi(callee_abi) {
286292
return err!(FunctionAbiMismatch(caller_abi, callee_abi));
287293
}

0 commit comments

Comments
 (0)