Module rustc::hir [] [src]

Unstable (rustc_private)

Reexports

pub use self::BindingMode::*;
pub use self::BinOp_::*;
pub use self::BlockCheckMode::*;
pub use self::CaptureClause::*;
pub use self::Decl_::*;
pub use self::Expr_::*;
pub use self::FunctionRetTy::*;
pub use self::ForeignItem_::*;
pub use self::Item_::*;
pub use self::Mutability::*;
pub use self::PathListItem_::*;
pub use self::PrimTy::*;
pub use self::Stmt_::*;
pub use self::TraitItem_::*;
pub use self::Ty_::*;
pub use self::TyParamBound::*;
pub use self::UnOp::*;
pub use self::UnsafeSource::*;
pub use self::ViewPath_::*;
pub use self::Visibility::{Public, Inherited};
pub use self::PathParameters::*;

Modules

check_attr [Unstable]
def [Unstable]
def_id [Unstable]
fold [Unstable]

A Folder represents an HIR->HIR fold; it accepts a HIR piece, and returns a piece of the same type.

intravisit [Unstable]

HIR walker. Each overridden visit method has full control over what happens with its node, it can do its own traversal of the node's children, call intravisit::walk_* to apply the default traversal algorithm, or prevent deeper traversal by doing nothing.

lowering [Unstable]
map [Unstable]
pat_util [Unstable]
print [Unstable]
svh [Unstable]

Calculation and management of a Strict Version Hash for crates

Structs

AngleBracketedParameterData [Unstable]

A path like Foo<'a, T>

Arg [Unstable]

represents an argument in a function header

Arm [Unstable]

represents one arm of a 'match'

BareFnTy [Unstable]
Block [Unstable]
Crate [Unstable]
EnumDef [Unstable]
Expr [Unstable]

An expression

Field [Unstable]
FieldPat [Unstable]

A single field in a struct pattern

FnDecl [Unstable]

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

ForeignItem [Unstable]
ForeignMod [Unstable]
Freevar [Unstable]

A free variable referred to in a function.

Generics [Unstable]

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

ImplItem [Unstable]
InlineAsm [Unstable]
InlineAsmOutput [Unstable]
Item [Unstable]

An item

ItemId [Unstable]
Lifetime [Unstable]
LifetimeDef [Unstable]

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

Local [Unstable]

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

MacroDef [Unstable]

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

MethodSig [Unstable]

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

Mod [Unstable]
MutTy [Unstable]
ParenthesizedParameterData [Unstable]

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

Pat [Unstable]
Path [Unstable]

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 [Unstable]

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

PolyTraitRef [Unstable]
QSelf [Unstable]

The explicit Self type in a "qualified path". The actual path, including the trait and the associated item, is stored separately. position represents the index of the associated item qualified with this Self type.

StructField [Unstable]
TraitCandidate [Unstable]
TraitItem [Unstable]

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

TraitRef [Unstable]

TraitRef's appear in impls.

Ty [Unstable]
TyParam [Unstable]
TypeBinding [Unstable]
Variant_ [Unstable]
WhereBoundPredicate [Unstable]

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

WhereClause [Unstable]

A where clause in a definition

WhereEqPredicate [Unstable]

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

WhereRegionPredicate [Unstable]

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

Enums

BinOp_ [Unstable]
BindingMode [Unstable]
BlockCheckMode [Unstable]
CaptureClause [Unstable]
Constness [Unstable]
Decl_ [Unstable]
Defaultness [Unstable]
Expr_ [Unstable]
ForeignItem_ [Unstable]

An item within an extern block

FunctionRetTy [Unstable]
ImplItemKind [Unstable]
ImplPolarity [Unstable]
Item_ [Unstable]
MatchSource [Unstable]
Mutability [Unstable]
PatKind [Unstable]
PathListItem_ [Unstable]
PathParameters [Unstable]
PrimTy [Unstable]

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

SelfKind [Unstable]

Alternative representation for Args describing self parameter of methods.

Stmt_ [Unstable]
TraitBoundModifier [Unstable]

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

TraitItem_ [Unstable]
TyParamBound [Unstable]

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_ [Unstable]

The different kinds of types recognized by the compiler

UnOp [Unstable]
UnsafeSource [Unstable]
Unsafety [Unstable]
VariantData [Unstable]

Fields and Ids of enum variants and structs

ViewPath_ [Unstable]
Visibility [Unstable]
WherePredicate [Unstable]

A single predicate in a where clause

Type Definitions

BinOp [Unstable]
CaptureModeMap [Unstable]
CrateConfig [Unstable]
Decl [Unstable]
ExplicitSelf [Unstable]
FreevarMap [Unstable]
GlobMap [Unstable]
HirVec [Unstable]

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.

PathListItem [Unstable]
Stmt [Unstable]

A statement

TraitMap [Unstable]
TyParamBounds [Unstable]
Variant [Unstable]
ViewPath [Unstable]