Expand description
Library containing Id types from rustc_hir
, split out so crates can use it without depending
on all of rustc_hir
(which is large and depends on other large things like rustc_target
).
Structs§
- HirId
- Uniquely identifies a node in the HIR of the current crate. It is
composed of the
owner
, which is theLocalDefId
of the directly enclosinghir::Item
,hir::TraitItem
, orhir::ImplItem
(i.e., the closest “item-like”), and thelocal_id
which is unique within the given owner. - Item
Local Id - An
ItemLocalId
uniquely identifies something within a given “item-like”; that is, within ahir::Item
,hir::TraitItem
, orhir::ImplItem
. There is no guarantee that the numerical value of a givenItemLocalId
corresponds to the node’s position within the owning item in any way, but there is a guarantee that theItemLocalId
s within an owner occupy a dense range of integers starting at zero, so a mapping that maps all or most nodes within an “item-like” to something else can be implemented by aVec
instead of a tree or hash map. - OwnerId
Constants§
- CRATE_
HIR_ ID - The
HirId
corresponding toCRATE_NODE_ID
andCRATE_DEF_ID
. - CRATE_
OWNER_ ID
Traits§
- Hash
Stable Context - Requirements for a
StableHashingContext
to be used in this crate.