Struct rustc::ty::TypeckTables
[−]
[src]
pub struct TypeckTables<'tcx> { pub type_relative_path_defs: NodeMap<Def>, pub node_types: NodeMap<Ty<'tcx>>, pub item_substs: NodeMap<ItemSubsts<'tcx>>, pub adjustments: NodeMap<Adjustment<'tcx>>, pub method_map: MethodMap<'tcx>, pub upvar_capture_map: UpvarCaptureMap<'tcx>, pub closure_tys: NodeMap<PolyFnSig<'tcx>>, pub closure_kinds: NodeMap<ClosureKind>, pub liberated_fn_sigs: NodeMap<FnSig<'tcx>>, pub fru_field_types: NodeMap<Vec<Ty<'tcx>>>, pub cast_kinds: NodeMap<CastKind>, pub lints: LintTable, pub used_trait_imports: DefIdSet, pub tainted_by_errors: bool, pub free_region_map: FreeRegionMap, }
rustc_private
)Fields
type_relative_path_defs: NodeMap<Def>
rustc_private
)Resolved definitions for <T>::X
associated paths.
node_types: NodeMap<Ty<'tcx>>
rustc_private
)Stores the types for various nodes in the AST. Note that this table is not guaranteed to be populated until after typeck. See typeck::check::fn_ctxt for details.
item_substs: NodeMap<ItemSubsts<'tcx>>
rustc_private
)Stores the type parameters which were substituted to obtain the type of this node. This only applies to nodes that refer to entities parameterized by type parameters, such as generic fns, types, or other items.
adjustments: NodeMap<Adjustment<'tcx>>
rustc_private
)method_map: MethodMap<'tcx>
rustc_private
)upvar_capture_map: UpvarCaptureMap<'tcx>
rustc_private
)Borrows
closure_tys: NodeMap<PolyFnSig<'tcx>>
rustc_private
)Records the type of each closure.
closure_kinds: NodeMap<ClosureKind>
rustc_private
)Records the kind of each closure.
liberated_fn_sigs: NodeMap<FnSig<'tcx>>
rustc_private
)For each fn, records the "liberated" types of its arguments and return type. Liberated means that all bound regions (including late-bound regions) are replaced with free equivalents. This table is not used in trans (since regions are erased there) and hence is not serialized to metadata.
fru_field_types: NodeMap<Vec<Ty<'tcx>>>
rustc_private
)For each FRU expression, record the normalized types of the fields of the struct - this is needed because it is non-trivial to normalize while preserving regions. This table is used only in MIR construction and hence is not serialized to metadata.
cast_kinds: NodeMap<CastKind>
rustc_private
)Maps a cast expression to its kind. This is keyed on the from expression of the cast, not the cast itself.
lints: LintTable
rustc_private
)Lints for the body of this fn generated by typeck.
used_trait_imports: DefIdSet
rustc_private
)Set of trait imports actually used in the method resolution. This is used for warning unused imports.
tainted_by_errors: bool
rustc_private
)If any errors occurred while type-checking this body,
this field will be set to true
.
free_region_map: FreeRegionMap
rustc_private
)Stores the free-region relationships that were deduced from its where clauses and parameter types. These are then read-again by borrowck.
Methods
impl<'tcx> TypeckTables<'tcx>
[src]
fn empty() -> TypeckTables<'tcx>
rustc_private
)fn qpath_def(&self, qpath: &QPath, id: NodeId) -> Def
rustc_private
)Returns the final resolution of a QPath
in an Expr
or Pat
node.
fn node_id_to_type(&self, id: NodeId) -> Ty<'tcx>
rustc_private
)fn node_id_to_type_opt(&self, id: NodeId) -> Option<Ty<'tcx>>
rustc_private
)fn node_id_item_substs(&self, id: NodeId) -> Option<&'tcx Substs<'tcx>>
rustc_private
)fn pat_ty(&self, pat: &Pat) -> Ty<'tcx>
rustc_private
)fn pat_ty_opt(&self, pat: &Pat) -> Option<Ty<'tcx>>
rustc_private
)fn expr_ty(&self, expr: &Expr) -> Ty<'tcx>
rustc_private
)fn expr_ty_opt(&self, expr: &Expr) -> Option<Ty<'tcx>>
rustc_private
)fn expr_ty_adjusted(&self, expr: &Expr) -> Ty<'tcx>
rustc_private
)Returns the type of expr
, considering any Adjustment
entry recorded for that expression.
fn expr_ty_adjusted_opt(&self, expr: &Expr) -> Option<Ty<'tcx>>
rustc_private
)fn is_method_call(&self, expr_id: NodeId) -> bool
rustc_private
)fn is_overloaded_autoderef(&self, expr_id: NodeId, autoderefs: u32) -> bool
rustc_private
)fn upvar_capture(&self, upvar_id: UpvarId) -> Option<UpvarCapture<'tcx>>
rustc_private
)Trait Implementations
impl<'tcx> Encodable for TypeckTables<'tcx>
[src]
fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>
🔬 This is a nightly-only experimental API. (rustc_private
)
deprecated in favor of rustc-serialize on crates.io
impl<'tcx> Decodable for TypeckTables<'tcx>
[src]
fn decode<__D: Decoder>(__arg_0: &mut __D)
-> Result<TypeckTables<'tcx>, __D::Error>
-> Result<TypeckTables<'tcx>, __D::Error>
🔬 This is a nightly-only experimental API. (rustc_private
)
deprecated in favor of rustc-serialize on crates.io