Skip to content

Commit 3ebcd78

Browse files
committed
fmt, and fix rustfmt-induced rebase hickup
1 parent 9a95b01 commit 3ebcd78

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/librustc_mir/interpret/terminator.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
324324
// this is a single iterator (that handles `spread_arg`), then
325325
// `pass_argument` would be the loop body. It takes care to
326326
// not advance `caller_iter` for ZSTs.
327-
let mut locals_iter = body.args_iter();
328-
while let Some(local) = locals_iter.next() {
327+
for local in body.args_iter() {
329328
let dest = self.eval_place(&mir::Place::from(local))?;
330329
if Some(local) == body.spread_arg {
331330
// Must be a tuple
@@ -340,9 +339,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
340339
}
341340
// Now we should have no more caller args
342341
if caller_iter.next().is_some() {
343-
throw_ub_format!(
344-
"calling a function with more arguments than it expected"
345-
)
342+
throw_ub_format!("calling a function with more arguments than it expected")
346343
}
347344
// Don't forget to check the return type!
348345
if let Some((caller_ret, _)) = ret {

0 commit comments

Comments
 (0)