Skip to content

Commit 9bb855c

Browse files
committed
Auto merge of #62674 - RalfJung:miri-abi, r=eddyb
RustIntrinsic and PlatformIntrinsic are also the same ABI as Rust r? @eddyb
2 parents e452e29 + 6c293d8 commit 9bb855c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/librustc_mir/interpret/terminator.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,13 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
280280
_ => bug!("unexpected callee ty: {:?}", instance_ty),
281281
}
282282
};
283-
// Rust and RustCall are compatible
284-
let normalize_abi = |abi| if abi == Abi::RustCall { Abi::Rust } else { abi };
283+
let normalize_abi = |abi| match abi {
284+
Abi::Rust | Abi::RustCall | Abi::RustIntrinsic | Abi::PlatformIntrinsic =>
285+
// These are all the same ABI, really.
286+
Abi::Rust,
287+
abi =>
288+
abi,
289+
};
285290
if normalize_abi(caller_abi) != normalize_abi(callee_abi) {
286291
return err!(FunctionAbiMismatch(caller_abi, callee_abi));
287292
}

0 commit comments

Comments
 (0)