mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-16 17:03:35 +00:00
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.
This commit is contained in:
parent
d71c06d022
commit
6e0e9edbe0
@ -1688,9 +1688,9 @@ impl<'a, 'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
|
||||
}
|
||||
}
|
||||
|
||||
let normalized_ident = ident.normalize_to_macros_2_0();
|
||||
let mut outer_res = None;
|
||||
for rib in lifetime_rib_iter {
|
||||
let normalized_ident = ident.normalize_to_macros_2_0();
|
||||
if let Some((&outer, _)) = rib.bindings.get_key_value(&normalized_ident) {
|
||||
outer_res = Some(outer);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user