about summary refs log tree commit diff
path: root/compiler/rustc_lint/src
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_lint/src')
-rw-r--r--compiler/rustc_lint/src/builtin.rs2
-rw-r--r--compiler/rustc_lint/src/drop_forget_useless.rs2
-rw-r--r--compiler/rustc_lint/src/if_let_rescope.rs4
-rw-r--r--compiler/rustc_lint/src/internal.rs4
-rw-r--r--compiler/rustc_lint/src/shadowed_into_iter.rs2
-rw-r--r--compiler/rustc_lint/src/unqualified_local_imports.rs2
6 files changed, 8 insertions, 8 deletions
diff --git a/compiler/rustc_lint/src/builtin.rs b/compiler/rustc_lint/src/builtin.rs
index e449f110613..b5f09ff346a 100644
--- a/compiler/rustc_lint/src/builtin.rs
+++ b/compiler/rustc_lint/src/builtin.rs
@@ -466,7 +466,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingDoc {
             MethodLateContext::TraitAutoImpl => {}
             // If the method is an impl for an item with docs_hidden, don't doc.
             MethodLateContext::PlainImpl => {
-                let parent = cx.tcx.hir().get_parent_item(impl_item.hir_id());
+                let parent = cx.tcx.hir_get_parent_item(impl_item.hir_id());
                 let impl_ty = cx.tcx.type_of(parent).instantiate_identity();
                 let outerdef = match impl_ty.kind() {
                     ty::Adt(def, _) => Some(def.did()),
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
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,
diff --git a/compiler/rustc_lint/src/internal.rs b/compiler/rustc_lint/src/internal.rs
index ddc9ae1594f..1f999bbea5f 100644
--- a/compiler/rustc_lint/src/internal.rs
+++ b/compiler/rustc_lint/src/internal.rs
@@ -497,7 +497,7 @@ impl Diagnostics {
             return;
         };
 
-        for (hir_id, _parent) in cx.tcx.hir().parent_iter(current_id) {
+        for (hir_id, _parent) in cx.tcx.hir_parent_iter(current_id) {
             if let Some(owner_did) = hir_id.as_owner()
                 && cx.tcx.has_attr(owner_did, sym::rustc_lint_diagnostics)
             {
@@ -512,7 +512,7 @@ impl Diagnostics {
         //
         // Otherwise, emit a `DIAGNOSTIC_OUTSIDE_OF_IMPL` lint.
         let mut is_inside_appropriate_impl = false;
-        for (_hir_id, parent) in cx.tcx.hir().parent_iter(current_id) {
+        for (_hir_id, parent) in cx.tcx.hir_parent_iter(current_id) {
             debug!(?parent);
             if let Node::Item(Item { kind: ItemKind::Impl(impl_), .. }) = parent
                 && let Impl { of_trait: Some(of_trait), .. } = impl_
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
diff --git a/compiler/rustc_lint/src/unqualified_local_imports.rs b/compiler/rustc_lint/src/unqualified_local_imports.rs
index b27398a950c..50c5119285f 100644
--- a/compiler/rustc_lint/src/unqualified_local_imports.rs
+++ b/compiler/rustc_lint/src/unqualified_local_imports.rs
@@ -68,7 +68,7 @@ impl<'tcx> LateLintPass<'tcx> for UnqualifiedLocalImports {
             return;
         }
 
-        let encl_item_id = cx.tcx.hir().get_parent_item(item.hir_id());
+        let encl_item_id = cx.tcx.hir_get_parent_item(item.hir_id());
         let encl_item = cx.tcx.hir_node_by_def_id(encl_item_id.def_id);
         if encl_item.fn_kind().is_some() {
             // `use` in a method -- don't lint, that leads to too many undesirable lints