about summary refs log tree commit diff
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2025-02-28 21:42:03 +0800
committerGitHub <noreply@github.com>2025-02-28 21:42:03 +0800
commit585e9031f20f34d5d0ea32c62d0ddef6797cec27 (patch)
tree76310fc115b6e8f678e9eeeb18e2c041db008f2b
parentd65f568302b70c675097bd2fb48e010d9711951b (diff)
parent059c0abeee26f6f38eb24190ae00aa8d5848a778 (diff)
downloadrust-585e9031f20f34d5d0ea32c62d0ddef6797cec27.tar.gz
rust-585e9031f20f34d5d0ea32c62d0ddef6797cec27.zip
Rollup merge of #137748 - samueltardieu:push-kozpqrxpkxkk, r=lqd
Fix method name in `TyCtxt::hir_crate()` documentation

Fix #137745
-rw-r--r--compiler/rustc_middle/src/query/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs
index 7c4ea06a746..46a960d9945 100644
--- a/compiler/rustc_middle/src/query/mod.rs
+++ b/compiler/rustc_middle/src/query/mod.rs
@@ -143,11 +143,11 @@ rustc_queries! {
 
     /// Represents crate as a whole (as distinct from the top-level crate module).
     ///
-    /// If you call `hir_crate` (e.g., indirectly by calling `tcx.hir().krate()`),
+    /// If you call `hir_crate` (e.g., indirectly by calling `tcx.hir_crate()`),
     /// we will have to assume that any change means that you need to be recompiled.
     /// This is because the `hir_crate` query gives you access to all other items.
-    /// To avoid this fate, do not call `tcx.hir().krate()`; instead,
-    /// prefer wrappers like `tcx.visit_all_items_in_krate()`.
+    /// To avoid this fate, do not call `tcx.hir_crate()`; instead,
+    /// prefer wrappers like [`TyCtxt::hir_visit_all_item_likes_in_crate`].
     query hir_crate(key: ()) -> &'tcx Crate<'tcx> {
         arena_cache
         eval_always