Module rustc_typeck::hir [] [src]

🔬 This is a nightly-only experimental API. (rustc_private)

Modules

check_attr [
Experimental
]
def [
Experimental
]
def_id [
Experimental
]
intravisit [
Experimental
]

HIR walker for walking the contents of nodes.

itemlikevisit [
Experimental
]
lowering [
Experimental
]
map [
Experimental
]
pat_util [
Experimental
]
print [
Experimental
]
svh [
Experimental
]

Calculation and management of a Strict Version Hash for crates

Structs

AngleBracketedParameterData [
Experimental
]

A path like Foo<'a, T>

Arg [
Experimental
]

represents an argument in a function header

Arm [
Experimental
]

represents one arm of a 'match'

BareFnTy [
Experimental
]
Block [
Experimental
]
Body [
Experimental
]

The body of a function or constant value.

BodyId [
Experimental
]
Crate [
Experimental
]
Destination [
Experimental
]
EnumDef [
Experimental
]
Expr [
Experimental
]

An expression

Field [
Experimental
]
FieldPat [
Experimental
]

A single field in a struct pattern

FnDecl [
Experimental
]

Represents the header (not the body) of a function declaration

ForeignItem [
Experimental
]
ForeignMod [
Experimental
]
Freevar [
Experimental
]

A free variable referred to in a function.

Generics [
Experimental
]

Represents lifetimes and type parameters attached to a declaration of a function, enum, trait, etc.

ImplItem [
Experimental
]

Represents anything within an impl block

ImplItemId [
Experimental
]
ImplItemRef [
Experimental
]

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).

InlineAsm [
Experimental
]
InlineAsmOutput [
Experimental
]
Item [
Experimental
]

An item

ItemId [
Experimental
]
Lifetime [
Experimental
]
LifetimeDef [
Experimental
]

A lifetime definition, eg 'a: 'b+'c+'d

Local [
Experimental
]

Local represents a let statement, e.g., let <pat>:<ty> = <expr>;

MacroDef [
Experimental
]

A macro definition, in this crate or imported from another.

MethodSig [
Experimental
]

Represents a method's signature in a trait declaration or implementation.

Mod [
Experimental
]
MutTy [
Experimental
]
ParenthesizedParameterData [
Experimental
]

A path like Foo(A,B) -> C

Pat [
Experimental
]
Path [
Experimental
]

A "Path" is essentially Rust's notion of a name; for instance: std::cmp::PartialEq . It's represented as a sequence of identifiers, along with a bunch of supporting information.

PathSegment [
Experimental
]

A segment of a path: an identifier, an optional lifetime, and a set of types.

PolyTraitRef [
Experimental
]
StructField [
Experimental
]
TraitCandidate [
Experimental
]
TraitItem [
Experimental
]

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).

TraitItemId [
Experimental
]
TraitItemRef [
Experimental
]

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).

TraitRef [
Experimental
]

TraitRef's appear in impls.

Ty [
Experimental
]
TyParam [
Experimental
]
TypeBinding [
Experimental
]
Variant_ [
Experimental
]
WhereBoundPredicate [
Experimental
]

A type bound, eg for<'c> Foo: Send+Clone+'c

WhereClause [
Experimental
]

A where clause in a definition

WhereEqPredicate [
Experimental
]

An equality predicate (unsupported), e.g. T=int

WhereRegionPredicate [
Experimental
]

A lifetime predicate, e.g. 'a: 'b+'c

Enums

AssociatedItemKind [
Experimental
]
BinOp_ [
Experimental
]
BindingMode [
Experimental
]
BlockCheckMode [
Experimental
]
CaptureClause [
Experimental
]
Constness [
Experimental
]
Decl_ [
Experimental
]
Defaultness [
Experimental
]
Expr_ [
Experimental
]
ForeignItem_ [
Experimental
]

An item within an extern block

FunctionRetTy [
Experimental
]
ImplItemKind [
Experimental
]

Represents different contents within impls

ImplPolarity [
Experimental
]
Item_ [
Experimental
]
LoopIdError [
Experimental
]
LoopIdResult [
Experimental
]
LoopSource [
Experimental
]

The loop type that yielded an ExprLoop

MatchSource [
Experimental
]

Hints at the original code for a match _ { .. }

Mutability [
Experimental
]
PatKind [
Experimental
]
PathParameters [
Experimental
]
PrimTy [
Experimental
]

Not represented directly in the AST, referred to by name through a ty_path.

QPath [
Experimental
]

Optionally Self-qualified value/type path or associated extension.

RangeEnd [
Experimental
]
Stmt_ [
Experimental
]
TraitBoundModifier [
Experimental
]

A modifier on a bound, currently this is only used for ?Sized, where the modifier is Maybe. Negative bounds should also be handled here.

TraitItemKind [
Experimental
]

Represents a trait method or associated constant or type

TraitMethod [
Experimental
]

A trait method's body (or just argument names).

TyParamBound [
Experimental
]

The AST represents all type param bounds as types. typeck::collect::compute_bounds matches these against the "special" built-in traits (see middle::lang_items) and detects Copy, Send and Sync.

Ty_ [
Experimental
]

The different kinds of types recognized by the compiler

UnOp [
Experimental
]
UnsafeGeneric [
Experimental
]
UnsafeSource [
Experimental
]
Unsafety [
Experimental
]
UseKind [
Experimental
]
VariantData [
Experimental
]

Fields and Ids of enum variants and structs

Visibility [
Experimental
]
WherePredicate [
Experimental
]

A single predicate in a where clause

Type Definitions

BinOp [
Experimental
]
CaptureModeMap [
Experimental
]
CrateConfig [
Experimental
]
Decl [
Experimental
]
FreevarMap [
Experimental
]
GlobMap [
Experimental
]
HirVec [
Experimental
]

HIR doesn't commit to a concrete storage type and have its own alias for a vector. It can be Vec, P<[T]> or potentially Box<[T]>, or some other container with similar behavior. Unlike AST, HIR is mostly a static structure, so we can use an owned slice instead of Vec to avoid keeping extra capacity.

Stmt [
Experimental
]

A statement

TraitMap [
Experimental
]
TyParamBounds [
Experimental
]
Variant [
Experimental
]