about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authorthe8472 <the8472@users.noreply.github.com>2021-09-21 22:54:00 +0200
committerGitHub <noreply@github.com>2021-09-21 22:54:00 +0200
commit9f50c87267d967084ef5124db07d175306efbb71 (patch)
treecd8fbe813e27b10a421b7f362ed6e0de57ea0f91 /compiler/rustc_resolve/src
parent051168b87641f8f10fa174a9f74a295eac2a4e7f (diff)
parent7c8f4f7eabe876057d855a2f5c008bedb6f477a4 (diff)
downloadrust-9f50c87267d967084ef5124db07d175306efbb71.tar.gz
rust-9f50c87267d967084ef5124db07d175306efbb71.zip
Rollup merge of #89078 - camsteffen:map-ref, r=cjgillot
Cleanup: Remove needless reference in ParentHirIterator

It forces an intermediate binding of `Map` which is a Copy type.
Diffstat (limited to 'compiler/rustc_resolve/src')
-rw-r--r--compiler/rustc_resolve/src/late/lifetimes.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/late/lifetimes.rs b/compiler/rustc_resolve/src/late/lifetimes.rs
index a158e0e48e8..84e7c68713f 100644
--- a/compiler/rustc_resolve/src/late/lifetimes.rs
+++ b/compiler/rustc_resolve/src/late/lifetimes.rs
@@ -522,8 +522,7 @@ fn item_for(tcx: TyCtxt<'_>, local_def_id: LocalDefId) -> LocalDefId {
         _ => {}
     }
     let item = {
-        let hir = tcx.hir();
-        let mut parent_iter = hir.parent_iter(hir_id);
+        let mut parent_iter = tcx.hir().parent_iter(hir_id);
         loop {
             let node = parent_iter.next().map(|n| n.1);
             match node {