1
Fork 0

Rollup merge of #137748 - samueltardieu:push-kozpqrxpkxkk, r=lqd

Fix method name in `TyCtxt::hir_crate()` documentation

Fix #137745
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2025-02-28 21:42:03 +08:00 committed by GitHub
commit 585e9031f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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