Rollup merge of #139772 - nnethercote:rm-hir-Map, r=Zalathar

Remove `hir::Map`

A follow-up to https://github.com/rust-lang/rust/pull/139232.

r? `@Zalathar`
This commit is contained in:
Stuart Cook 2025-04-15 15:47:28 +10:00 committed by GitHub
commit 9d6c95d146
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 36 additions and 65 deletions

View file

@ -6,7 +6,7 @@
//! 1. **Shallow visit**: Get a simple callback for every item (or item-like thing) in the HIR.
//! - Example: find all items with a `#[foo]` attribute on them.
//! - How: Use the `hir_crate_items` or `hir_module_items` query to traverse over item-like ids
//! (ItemId, TraitItemId, etc.) and use tcx.def_kind and `tcx.hir().item*(id)` to filter and
//! (ItemId, TraitItemId, etc.) and use tcx.def_kind and `tcx.hir_item*(id)` to filter and
//! access actual item-like thing, respectively.
//! - Pro: Efficient; just walks the lists of item ids and gives users control whether to access
//! the hir_owners themselves or not.