fmt, and fix rustfmt-induced rebase hickup
This commit is contained in:
parent
9a95b010e6
commit
3ebcd78b42
1 changed files with 2 additions and 5 deletions
|
|
@ -324,8 +324,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
// this is a single iterator (that handles `spread_arg`), then
|
||||
// `pass_argument` would be the loop body. It takes care to
|
||||
// not advance `caller_iter` for ZSTs.
|
||||
let mut locals_iter = body.args_iter();
|
||||
while let Some(local) = locals_iter.next() {
|
||||
for local in body.args_iter() {
|
||||
let dest = self.eval_place(&mir::Place::from(local))?;
|
||||
if Some(local) == body.spread_arg {
|
||||
// Must be a tuple
|
||||
|
|
@ -340,9 +339,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
}
|
||||
// Now we should have no more caller args
|
||||
if caller_iter.next().is_some() {
|
||||
throw_ub_format!(
|
||||
"calling a function with more arguments than it expected"
|
||||
)
|
||||
throw_ub_format!("calling a function with more arguments than it expected")
|
||||
}
|
||||
// Don't forget to check the return type!
|
||||
if let Some((caller_ret, _)) = ret {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue