@@ -932,12 +932,15 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
932
932
self . read_c_str_with_char_size ( ptr, wchar_t. size , wchar_t. align . abi )
933
933
}
934
934
935
- /// Check that the ABI is what we expect.
936
- fn check_abi < ' a > ( & self , fn_abi : & FnAbi < ' tcx , Ty < ' tcx > > , exp_abi : Conv ) -> InterpResult < ' a , ( ) > {
935
+ /// Check that the calling convention is what we expect.
936
+ fn check_callconv < ' a > (
937
+ & self ,
938
+ fn_abi : & FnAbi < ' tcx , Ty < ' tcx > > ,
939
+ exp_abi : Conv ,
940
+ ) -> InterpResult < ' a , ( ) > {
937
941
if fn_abi. conv != exp_abi {
938
942
throw_ub_format ! (
939
- "calling a function with ABI {:?} using caller ABI {:?}" ,
940
- exp_abi,
943
+ "calling a function with calling convention {exp_abi} using caller calling convention {}" ,
941
944
fn_abi. conv
942
945
) ;
943
946
}
@@ -973,7 +976,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
973
976
exp_abi : Conv ,
974
977
link_name : Symbol ,
975
978
) -> InterpResult < ' tcx , ( ) > {
976
- self . check_abi ( abi, exp_abi) ?;
979
+ self . check_callconv ( abi, exp_abi) ?;
977
980
if let Some ( ( body, instance) ) = self . eval_context_mut ( ) . lookup_exported_symbol ( link_name) ? {
978
981
// If compiler-builtins is providing the symbol, then don't treat it as a clash.
979
982
// We'll use our built-in implementation in `emulate_foreign_item_inner` for increased
0 commit comments