rustc_hir - Rust (original) (raw)
Expand description
pub use lang_items::[LangItem](lang%5Fitems/enum.LangItem.html "enum rustc_hir::lang_items::LangItem");
pub use lang_items::[LanguageItems](lang%5Fitems/struct.LanguageItems.html "struct rustc_hir::lang_items::LanguageItems");
pub use [rustc_hir_id](../rustc%5Fhir%5Fid/index.html "mod rustc_hir_id") as hir_id;
pub use [hir](hir/index.html "mod rustc_hir::hir")::*;
arena đź”’
Data structures for representing parsed attributes in the Rust compiler. Formerly rustc_attr_data_structures.
For each definition, we track the following data. A definition here is defined somewhat circularly as “something with a DefId”, but it generally corresponds to things like structs, enums, etc. There are also some rather random cases (like const initializer expressions) that are mostly just leftovers.
hir đź”’
HIR walker for walking the contents of nodes.
Defines lang items.
stability đź”’
stable_hash_impls đź”’
target đź”’
This module implements some validity checks for attributes. In particular it verifies that #[inline] and #[repr] attributes are attached to items that actually support them and if there are conflicts between multiple such attributes attached to the same item.
version đź”’
Validity checking for weak lang items
This higher-order macro declares a list of types which can be allocated by Arena. Note that all Copy types can be allocated by default and need not be specified here.
Finds attributes in sequences of attributes by pattern matching.
Represents the #[rustc_const_unstable] and #[rustc_const_stable] attributes.
Represents the #[rustc_default_body_unstable] attribute.
Uniquely identifies a node in the HIR of the current crate. It is composed of the owner, which is the LocalDefId of the directly enclosinghir::Item, hir::TraitItem, or hir::ImplItem (i.e., the closest “item-like”), and the local_id which is unique within the given owner.
An ItemLocalId uniquely identifies something within a given “item-like”; that is, within a hir::Item, hir::TraitItem, or hir::ImplItem. There is no guarantee that the numerical value of a given ItemLocalId corresponds to the node’s position within the owning item in any way, but there is a guarantee that the ItemLocalIds 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 a Vec instead of a tree or hash map.
Excludes const_stable_indirect. This is necessary because when -Zforce-unstable-if-unmarkedis set, we need to encode standalone #[rustc_const_stable_indirect] attributes
Represents the following attributes:
The available stability levels.
Rust release in which a feature is stabilized.
The HirId corresponding to CRATE_NODE_ID and CRATE_DEF_ID.
The version placeholder that recently stabilized features contain inside thesince field of the #[stable] attribute.
Requirements for a StableHashingContext to be used in this crate. This is a hack to allow using the HashStable_Generic derive macro instead of implementing everything in rustc_middle.