Skip to content

Commit 1c7d747

Browse files
author
hyd-dev
committed
Don't duplicate check_abi()
1 parent 0788188 commit 1c7d747

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/helpers.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,7 @@ 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-
if callee_abi != caller_abi {
173-
throw_ub_format!("calling a function with ABI {} using caller ABI {}", callee_abi.name(), caller_abi.name())
174-
}
172+
check_abi(caller_abi, callee_abi)?;
175173

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

0 commit comments

Comments
 (0)