Expand description
HIR datatypes. See the rustc dev guide for more info.
Re-exports§
pub use lang_items::LangItem;
pub use lang_items::LanguageItems;
pub use hir::*;
pub use hir_id::*;
Modules§
- arena 🔒
- attrs
- Data structures for representing parsed attributes in the Rust compiler.
Formerly
rustc_attr_data_structures
. - def
- def_id
- def_
path_ hash_ map - definitions
- 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. - diagnostic_
items - hir 🔒
- hir_id
- intravisit
- HIR walker for walking the contents of nodes.
- lang_
items - Defines lang items.
- lints
- pat_
util - 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 🔒
- weak_
lang_ items - Validity checking for weak lang items
Macros§
- arena_
types - This higher-order macro declares a list of types which can be allocated by
Arena
. Note that allCopy
types can be allocated by default and need not be specified here. - find_
attr - Finds attributes in sequences of attributes by pattern matching.
Structs§
- Arena
- Const
Stability - Represents the
#[rustc_const_unstable]
and#[rustc_const_stable]
attributes. - Default
Body Stability - Represents the
#[rustc_default_body_unstable]
attribute. - Partial
Const Stability - Excludes
const_stable_indirect
. This is necessary because when-Zforce-unstable-if-unmarked
is set, we need to encode standalone#[rustc_const_stable_indirect]
attributes - Rustc
Version - Stability
- Represents the following attributes:
Enums§
- Method
Kind - Stability
Level - The available stability levels.
- Stable
Since - Rust release in which a feature is stabilized.
- Target
- Unstable
Reason
Constants§
- VERSION_
PLACEHOLDER - The version placeholder that recently stabilized features contain inside the
since
field of the#[stable]
attribute.
Traits§
- Arena
Allocatable - Hash
Stable Context - Requirements for a
StableHashingContext
to be used in this crate. This is a hack to allow using theHashStable_Generic
derive macro instead of implementing everything inrustc_middle
.