Skip to content

Commit

Permalink
Don't duplicate check_abi()
Browse files Browse the repository at this point in the history
  • Loading branch information
hyd-dev committed Mar 16, 2021
1 parent 0788188 commit 1c7d747
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
let this = self.eval_context_mut();
let param_env = ty::ParamEnv::reveal_all(); // in Miri this is always the param_env we use... and this.param_env is private.
let callee_abi = f.ty(*this.tcx, param_env).fn_sig(*this.tcx).abi();
if callee_abi != caller_abi {
throw_ub_format!("calling a function with ABI {} using caller ABI {}", callee_abi.name(), caller_abi.name())
}
check_abi(caller_abi, callee_abi)?;

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

0 comments on commit 1c7d747

Please sign in to comment.