about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/if_let_rescope.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-02-21 07:54:35 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2025-02-21 14:31:09 +1100
commit806be25fc9d519d32db1941b0c67a06c8a6faa40 (patch)
tree3c0b3d57fe4f10663e171164338aeafead10d545 /compiler/rustc_lint/src/if_let_rescope.rs
parent43c2b0086a60ad9864af5ead49b058e8d8ef1de8 (diff)
downloadrust-806be25fc9d519d32db1941b0c67a06c8a6faa40.tar.gz
rust-806be25fc9d519d32db1941b0c67a06c8a6faa40.zip
Move methods from Map to TyCtxt, part 3.
Continuing the work from #137162.

Every method gains a `hir_` prefix.
Diffstat (limited to 'compiler/rustc_lint/src/if_let_rescope.rs')
-rw-r--r--compiler/rustc_lint/src/if_let_rescope.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/if_let_rescope.rs b/compiler/rustc_lint/src/if_let_rescope.rs
index 869dab6799d..c1aa95667da 100644
--- a/compiler/rustc_lint/src/if_let_rescope.rs
+++ b/compiler/rustc_lint/src/if_let_rescope.rs
@@ -95,7 +95,7 @@ pub(crate) struct IfLetRescope {
 }
 
 fn expr_parent_is_else(tcx: TyCtxt<'_>, hir_id: hir::HirId) -> bool {
-    let Some((_, hir::Node::Expr(expr))) = tcx.hir().parent_iter(hir_id).next() else {
+    let Some((_, hir::Node::Expr(expr))) = tcx.hir_parent_iter(hir_id).next() else {
         return false;
     };
     let hir::ExprKind::If(_cond, _conseq, Some(alt)) = expr.kind else { return false };
@@ -103,7 +103,7 @@ fn expr_parent_is_else(tcx: TyCtxt<'_>, hir_id: hir::HirId) -> bool {
 }
 
 fn expr_parent_is_stmt(tcx: TyCtxt<'_>, hir_id: hir::HirId) -> bool {
-    let mut parents = tcx.hir().parent_iter(hir_id);
+    let mut parents = tcx.hir_parent_iter(hir_id);
     let stmt = match parents.next() {
         Some((_, hir::Node::Stmt(stmt))) => stmt,
         Some((_, hir::Node::Block(_) | hir::Node::Arm(_))) => return true,