Skip to content

Commit 3ee8654

Browse files
author
hyd-dev
committed
Revert "Don't duplicate check_abi()"
This reverts commit 1c7d747.
1 parent bbc3485 commit 3ee8654

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/helpers.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
169169
let this = self.eval_context_mut();
170170
let param_env = ty::ParamEnv::reveal_all(); // in Miri this is always the param_env we use... and this.param_env is private.
171171
let callee_abi = f.ty(*this.tcx, param_env).fn_sig(*this.tcx).abi();
172-
check_abi(caller_abi, callee_abi)?;
172+
if callee_abi != caller_abi {
173+
throw_ub_format!("calling a function with ABI {} using caller ABI {}", callee_abi.name(), caller_abi.name())
174+
}
173175

174176
// Push frame.
175177
let mir = &*this.load_mir(f.def, None)?;

0 commit comments

Comments
 (0)