Skip to content

Commit 585e903

Browse files
authored
Rollup merge of rust-lang#137748 - samueltardieu:push-kozpqrxpkxkk, r=lqd
Fix method name in `TyCtxt::hir_crate()` documentation Fix rust-lang#137745
2 parents d65f568 + 059c0ab commit 585e903

File tree

1 file changed

+3
-3
lines changed
  • compiler/rustc_middle/src/query

1 file changed

+3
-3
lines changed

Diff for: compiler/rustc_middle/src/query/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,11 @@ rustc_queries! {
143143

144144
/// Represents crate as a whole (as distinct from the top-level crate module).
145145
///
146-
/// If you call `hir_crate` (e.g., indirectly by calling `tcx.hir().krate()`),
146+
/// If you call `hir_crate` (e.g., indirectly by calling `tcx.hir_crate()`),
147147
/// we will have to assume that any change means that you need to be recompiled.
148148
/// This is because the `hir_crate` query gives you access to all other items.
149-
/// To avoid this fate, do not call `tcx.hir().krate()`; instead,
150-
/// prefer wrappers like `tcx.visit_all_items_in_krate()`.
149+
/// To avoid this fate, do not call `tcx.hir_crate()`; instead,
150+
/// prefer wrappers like [`TyCtxt::hir_visit_all_item_likes_in_crate`].
151151
query hir_crate(key: ()) -> &'tcx Crate<'tcx> {
152152
arena_cache
153153
eval_always

0 commit comments

Comments
 (0)