Skip to content

Commit 6e0e9ed

Browse files
committed
Move a call outside a loop.
This path isn't hot enough for this to affect performance, but there's no point repeating the same computation multiple times.
1 parent d71c06d commit 6e0e9ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_resolve/src/late.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1688,9 +1688,9 @@ impl<'a, 'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
16881688
}
16891689
}
16901690

1691+
let normalized_ident = ident.normalize_to_macros_2_0();
16911692
let mut outer_res = None;
16921693
for rib in lifetime_rib_iter {
1693-
let normalized_ident = ident.normalize_to_macros_2_0();
16941694
if let Some((&outer, _)) = rib.bindings.get_key_value(&normalized_ident) {
16951695
outer_res = Some(outer);
16961696
break;

0 commit comments

Comments
 (0)