Skip to content

Commit f499601

Browse files
committed
Create closure outside of the loop
1 parent 89bc399 commit f499601

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler/rustc_resolve/src/late.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -953,8 +953,8 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
953953
});
954954
};
955955

956-
for item in trait_items {
957-
this.with_trait_items(trait_items, |this| {
956+
this.with_trait_items(trait_items, |this| {
957+
for item in trait_items {
958958
match &item.kind {
959959
AssocItemKind::Const(_, ty, default) => {
960960
this.visit_ty(ty);
@@ -983,8 +983,8 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
983983
panic!("unexpanded macro in resolve!")
984984
}
985985
};
986-
});
987-
}
986+
}
987+
});
988988
});
989989
});
990990
}

0 commit comments

Comments
 (0)