diff options
| author | Ralf Jung <post@ralfj.de> | 2020-03-08 23:55:25 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2020-03-11 19:44:23 +0100 |
| commit | 3ebcd78b4285cee14f6b479d33bc939a5cc0414b (patch) | |
| tree | 332f67868e400c9c114a8d43161c43044eea0581 | |
| parent | 9a95b010e6b46d113228b67ef237b42868e7be8d (diff) | |
| download | rust-3ebcd78b4285cee14f6b479d33bc939a5cc0414b.tar.gz rust-3ebcd78b4285cee14f6b479d33bc939a5cc0414b.zip | |
fmt, and fix rustfmt-induced rebase hickup
| -rw-r--r-- | src/librustc_mir/interpret/terminator.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/librustc_mir/interpret/terminator.rs b/src/librustc_mir/interpret/terminator.rs index 6fc7355fab3..2d1493febc4 100644 --- a/src/librustc_mir/interpret/terminator.rs +++ b/src/librustc_mir/interpret/terminator.rs @@ -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 { |
