Module rustc::hir [−][src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Re-exports
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::PrimTy::*; |
pub use self::Stmt_::*; |
pub use self::Ty_::*; |
pub use self::TyParamBound::*; |
pub use self::UnOp::*; |
pub use self::UnsafeSource::*; |
pub use self::Visibility::Public; |
pub use self::Visibility::Inherited; |
use hir::def::Def; |
use hir::def_id::DefId; |
use hir::def_id::DefIndex; |
use hir::def_id::LocalDefId; |
use hir::def_id::CRATE_DEF_INDEX; |
use util::nodemap::NodeMap; |
use util::nodemap::NodeMap; |
use util::nodemap::FxHashSet; |
use util::nodemap::FxHashSet; |
use mir::mono::Linkage; |
use syntax_pos::Span; |
use syntax_pos::DUMMY_SP; |
use syntax::codemap; |
use syntax::codemap::Spanned; |
use rustc_target::spec::abi::Abi; |
use syntax::ast; |
use syntax::ast::CrateSugar; |
use syntax::ast::Ident; |
use syntax::ast::Name; |
use syntax::ast::NodeId; |
use syntax::ast::DUMMY_NODE_ID; |
use syntax::ast::AsmDialect; |
use syntax::ast::Attribute; |
use syntax::ast::Lit; |
use syntax::ast::StrStyle; |
use syntax::ast::FloatTy; |
use syntax::ast::IntTy; |
use syntax::ast::UintTy; |
use syntax::ast::MetaItem; |
use syntax::attr::InlineAttr; |
use syntax::ext::hygiene::SyntaxContext; |
use syntax::ptr::P; |
use syntax::ptr::P; |
use syntax::symbol::Symbol; |
use syntax::symbol::keywords; |
use syntax::tokenstream::TokenStream; |
use syntax::util::ThinVec; |
use syntax::util::parser::ExprPrecedence; |
use ty::AdtKind; |
use ty::query::Providers; |
use rustc_data_structures::indexed_vec; |
use rustc_data_structures::sync::ParallelIterator; |
use rustc_data_structures::sync::par_iter; |
use rustc_data_structures::sync::Send; |
use rustc_data_structures::sync::Sync; |
use rustc_data_structures::sync::scope; |
use serialize; |
use serialize::Encoder; |
use serialize::Encodable; |
use serialize::Decoder; |
use serialize::Decodable; |
use std::collections::BTreeMap; |
use std::fmt; |
use std::iter; |
use std::slice; |
Modules
check_attr |
[ Experimental ] This module implements some validity checks for attributes.
In particular it verifies that |
def |
[ Experimental ]
|
def_id |
[ Experimental ]
|
intravisit |
[ Experimental ] HIR walker for walking the contents of nodes. |
itemlikevisit |
[ Experimental ]
|
lowering |
[ Experimental ] Lowers the AST to the HIR. |
map |
[ Experimental ]
|
pat_util |
[ Experimental ]
|
[ Experimental ]
|
|
svh |
[ Experimental ] Calculation and management of a Strict Version Hash for crates |
Structs
AnonConst |
[ Experimental ] A constant (expression) that's not an item or associated item,
but needs its own |
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, 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. |
BodyId |
[ Experimental ]
|
CodegenFnAttrFlags |
[ Experimental ]
|
CodegenFnAttrs |
[ Experimental ]
|
Crate |
[ Experimental ] The top-level data structure that stores the entire contents of the crate currently being compiled. |
Destination |
[ Experimental ]
|
EnumDef |
[ Experimental ]
|
ExistTy |
[ 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. |
GlobalAsm |
[ Experimental ]
|
HirId |
[ Experimental ] A HirId uniquely identifies a node in the HIR of the current crate. It is
composed of the |
ImplItem |
[ Experimental ] Represents anything within an |
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 ]
|
ItemLocalId |
[ Experimental ] An |
Label |
[ Experimental ]
|
Lifetime |
[ Experimental ]
|
LifetimeDef |
[ Experimental ] A lifetime definition, eg |
Local |
[ Experimental ] Local represents a |
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 ]
|
Pat |
[ Experimental ]
|
Path |
[ Experimental ] A "Path" is essentially Rust's notion of a name; for instance:
|
PathParameters |
[ Experimental ]
|
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 |
WhereClause |
[ Experimental ] A |
WhereEqPredicate |
[ Experimental ] An equality predicate (unsupported), e.g. |
WhereRegionPredicate |
[ Experimental ] A lifetime predicate, e.g. |
Enums
AssociatedItemKind |
[ Experimental ]
|
BinOp_ |
[ Experimental ]
|
BindingAnnotation |
[ Experimental ] 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. |
BlockCheckMode |
[ Experimental ]
|
BodyOwnerKind |
[ Experimental ]
|
CaptureClause |
[ Experimental ]
|
Constness |
[ Experimental ]
|
Decl_ |
[ Experimental ]
|
Defaultness |
[ Experimental ]
|
Expr_ |
[ Experimental ]
|
ForeignItem_ |
[ Experimental ] An item within an |
FunctionRetTy |
[ Experimental ]
|
GeneratorMovability |
[ Experimental ]
|
GenericParam |
[ Experimental ]
|
ImplItemKind |
[ Experimental ] Represents different contents within |
ImplPolarity |
[ Experimental ]
|
IsAuto |
[ Experimental ] Is the trait definition an auto trait? |
Item_ |
[ Experimental ]
|
LifetimeName |
[ Experimental ]
|
LocalSource |
[ Experimental ] Hints at the original code for a let statement |
LoopIdError |
[ Experimental ]
|
LoopSource |
[ Experimental ] The loop type that yielded an ExprLoop |
MatchSource |
[ Experimental ] Hints at the original code for a |
Mutability |
[ Experimental ]
|
PatKind |
[ Experimental ]
|
PrimTy |
[ Experimental ] Not represented directly in the AST, referred to by name through a ty_path. |
QPath |
[ Experimental ] Optionally |
RangeEnd |
[ Experimental ]
|
Stmt_ |
[ Experimental ]
|
SyntheticTyParamKind |
[ Experimental ] Synthetic Type Parameters are converted to an other form during lowering, this allows to track the original form they had. Useful for error messages. |
TraitBoundModifier |
[ Experimental ] A modifier on a bound, currently this is only used for |
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 |
Constants
CRATE_HIR_ID |
[ Experimental ] The |
DUMMY_HIR_ID |
[ Experimental ]
|
DUMMY_ITEM_LOCAL_ID |
[ Experimental ]
|
Traits
GenericParamsExt |
[ Experimental ]
|
Functions
provide |
[ Experimental ]
|
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 has its own alias for a vector.
It can be |
Stmt |
[ Experimental ] A statement |
TraitMap |
[ Experimental ]
|
TyParamBounds |
[ Experimental ]
|
Variant |
[ Experimental ]
|