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.
This commit is contained in:
commit
9f50c87267
4 changed files with 15 additions and 22 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue