about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/drop_forget_useless.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-02-21 19:01:15 +0100
committerGitHub <noreply@github.com>2025-02-21 19:01:15 +0100
commita24eb0bae9b51df19a26c5241cabc3ebc008bd38 (patch)
tree4c954998c95fd05672973a5e3581a3cce2b5ce2c /compiler/rustc_lint/src/drop_forget_useless.rs
parent2dc7573edd7a90a31baa2d751a53717702947d14 (diff)
parent806be25fc9d519d32db1941b0c67a06c8a6faa40 (diff)
downloadrust-a24eb0bae9b51df19a26c5241cabc3ebc008bd38.tar.gz
rust-a24eb0bae9b51df19a26c5241cabc3ebc008bd38.zip
Rollup merge of #137350 - nnethercote:remove-Map-3, r=Zalathar
Move methods from Map to TyCtxt, part 3.

A follow-up to #137162.

r? `@Zalathar`
Diffstat (limited to 'compiler/rustc_lint/src/drop_forget_useless.rs')
-rw-r--r--compiler/rustc_lint/src/drop_forget_useless.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/drop_forget_useless.rs b/compiler/rustc_lint/src/drop_forget_useless.rs
index 1ca2e4e74ea..7f098893f7d 100644
--- a/compiler/rustc_lint/src/drop_forget_useless.rs
+++ b/compiler/rustc_lint/src/drop_forget_useless.rs
@@ -147,7 +147,7 @@ impl<'tcx> LateLintPass<'tcx> for DropForgetUseless {
             let is_copy = cx.type_is_copy_modulo_regions(arg_ty);
             let drop_is_single_call_in_arm = is_single_call_in_arm(cx, arg, expr);
             let let_underscore_ignore_sugg = || {
-                if let Some((_, node)) = cx.tcx.hir().parent_iter(expr.hir_id).nth(0)
+                if let Some((_, node)) = cx.tcx.hir_parent_iter(expr.hir_id).nth(0)
                     && let Node::Stmt(stmt) = node
                     && let StmtKind::Semi(e) = stmt.kind
                     && e.hir_id == expr.hir_id