about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/shadowed_into_iter.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_lint/src/shadowed_into_iter.rs')
-rw-r--r--compiler/rustc_lint/src/shadowed_into_iter.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/shadowed_into_iter.rs b/compiler/rustc_lint/src/shadowed_into_iter.rs
index 7cc35e20fcb..571cab934fd 100644
--- a/compiler/rustc_lint/src/shadowed_into_iter.rs
+++ b/compiler/rustc_lint/src/shadowed_into_iter.rs
@@ -128,7 +128,7 @@ impl<'tcx> LateLintPass<'tcx> for ShadowedIntoIter {
         // we should just suggest removing the `.into_iter()` or changing it to `.iter()`
         // to disambiguate if we want to iterate by-value or by-ref.
         let sub = if let Some((_, hir::Node::Expr(parent_expr))) =
-            cx.tcx.hir().parent_iter(expr.hir_id).nth(1)
+            cx.tcx.hir_parent_iter(expr.hir_id).nth(1)
             && let hir::ExprKind::Match(arg, [_], hir::MatchSource::ForLoopDesugar) =
                 &parent_expr.kind
             && let hir::ExprKind::Call(path, [_]) = &arg.kind