HIR datatypes. See the rustc dev guide for more info.
For each definition, we track the following data. A definition
here is defined somewhat circularly as "something with a
HIR walker for walking the contents of nodes.
Defines language items.
This module implements some validity checks for attributes.
In particular it verifies that
Validity checking for weak lang items
This declares a list of types which can be allocated by
A constant (expression) that's not an item or associated item,
but needs its own
Represents a single arm of a
A block of statements
The body of a function, closure, or constant value. In the case of a function, the body contains not only the function body itself (which is an expression), but also the argument patterns, since those are something that the caller doesn't really care about.
The top-level data structure that stores the entire contents of the crate currently being compiled.
A type representing only the top-level module.
A single field in a struct pattern.
Represents the header (not the body) of a function declaration.
Represents a function's signature in a trait declaration, trait implementation, or a free function.
A reference from a foreign block to one of its items. This contains the item's ID, naturally, but also the item's name and some other high-level details (like whether it is an associated type or method, and whether it is public). This allows other passes to find the impl they want without loading the ID (which means fewer edges in the incremental compilation graph).
Represents lifetimes and type parameters attached to a declaration of a function, enum, trait, etc.
Represents anything within an
A reference from an impl to one of its associated items. This contains the item's ID, naturally, but also the item's name and some other high-level details (like whether it is an associated type or method, and whether it is public). This allows other passes to find the impl they want without loading the ID (which means fewer edges in the incremental compilation graph).
A macro definition, in this crate or imported from another.
Represents a parameter in a function header.
A segment of a path: an identifier, an optional lifetime, and a set of types.
Represents an item declaration within a trait declaration, possibly including a default implementation. A trait item is either required (meaning it doesn't have an implementation, just a signature) or provided (meaning it has a default implementation).
A reference from an trait to one of its associated items. This contains the item's id, naturally, but also the item's name and some other high-level details (like whether it is an associated type or method, and whether it is public). This allows other passes to find the impl they want without loading the ID (which means fewer edges in the incremental compilation graph).
References to traits in impls.
Bind a type to an associated type (i.e.,
A variable captured by a closure.
A type bound (e.g.,
A where-clause in a definition.
An equality predicate (e.g.,
A lifetime predicate (e.g.,
In the case of a generator created as part of an async construct, which kind of async construct caused it to be created?
Explicit binding annotations given in the HIR for a binding. Note that this is not the final binding mode that we infer after type inference.
The kind of borrow in an
A capture clause used in closures and
The kind of an item that requires const-checking.
An item within an
The type of source expression that caused this generator to be created.
The AST represents all type param bounds as types.
Represents various kinds of content within an
Represents what type of implicit self a function has, if any.
Is the trait definition an auto trait?
Hints at the original code for a let statement.
The loop type that yielded an
Hints at the original code for a
The movability of a generator / closure literal:
whether a generator contains self-references, causing it to be
From whence the opaque type came.
Not represented directly in the AST; referred to by name through a
Represents an optionally
The contents of a statement.
Synthetic type parameters are converted to another form during lowering; this allows us to track the original form they had, and is useful for error messages.
A modifier on a bound, currently this is only used for
Represents a trait method's body (or just argument names).
Represents a trait method or associated constant or type
The various kinds of types recognized by the compiler.
Fields and constructor IDs of enum variants and structs.
A single predicate in a where-clause.
The yield kind that caused an
Requirements for a
Checks if the specified expression is a built-in range literal.