Skip to content

Commit f3a0f68

Browse files
committed
Zip -> Enumerate
1 parent d708d7f commit f3a0f68

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/rustc_mir/src/borrow_check/type_check/input_output.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
7373
);
7474

7575
// Equate expected input tys with those in the MIR.
76-
for (&normalized_input_ty, argument_index) in normalized_input_tys.iter().zip(0..) {
76+
for (argument_index, &normalized_input_ty) in normalized_input_tys.iter().enumerate() {
7777
// In MIR, argument N is stored in local N+1.
7878
let local = Local::new(argument_index + 1);
7979

@@ -87,8 +87,8 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
8787
}
8888

8989
if let Some(user_provided_sig) = user_provided_sig {
90-
for (&user_provided_input_ty, argument_index) in
91-
user_provided_sig.inputs().iter().zip(0..)
90+
for (argument_index, &user_provided_input_ty) in
91+
user_provided_sig.inputs().iter().enumerate()
9292
{
9393
// In MIR, closures begin an implicit `self`, so
9494
// argument N is stored in local N+2.

0 commit comments

Comments
 (0)