Struct rustc::ty::TypeckTables [−][src]
pub struct TypeckTables<'tcx> { pub local_id_root: Option<DefId>, type_dependent_defs: ItemLocalMap<Def>, field_indices: ItemLocalMap<usize>, user_provided_tys: ItemLocalMap<CanonicalTy<'tcx>>, node_types: ItemLocalMap<Ty<'tcx>>, node_substs: ItemLocalMap<&'tcx Substs<'tcx>>, adjustments: ItemLocalMap<Vec<Adjustment<'tcx>>>, pat_binding_modes: ItemLocalMap<BindingMode>, pat_adjustments: ItemLocalMap<Vec<Ty<'tcx>>>, pub upvar_capture_map: UpvarCaptureMap<'tcx>, closure_kind_origins: ItemLocalMap<(Span, Name)>, liberated_fn_sigs: ItemLocalMap<FnSig<'tcx>>, fru_field_types: ItemLocalMap<Vec<Ty<'tcx>>>, cast_kinds: ItemLocalMap<CastKind>, pub used_trait_imports: Lrc<DefIdSet>, pub tainted_by_errors: bool, pub free_region_map: FreeRegionMap<'tcx>, }
🔬 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?
Fields
local_id_root: Option<DefId>
🔬 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?
The HirId::owner all ItemLocalIds in this table are relative to.
type_dependent_defs: ItemLocalMap<Def>
🔬 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?
Resolved definitions for <T>::X
associated paths and
method calls, including those of overloaded operators.
field_indices: ItemLocalMap<usize>
🔬 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?
Resolved field indices for field accesses in expressions (S { field }
, obj.field
)
or patterns (S { field }
). The index is often useful by itself, but to learn more
about the field you also need definition of the variant to which the field
belongs, but it may not exist if it's a tuple field (tuple.0
).
user_provided_tys: ItemLocalMap<CanonicalTy<'tcx>>
🔬 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?
Stores the canonicalized types provided by the user. See also UserAssertTy
statement in
MIR.
node_types: ItemLocalMap<Ty<'tcx>>
🔬 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?
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.
node_substs: ItemLocalMap<&'tcx Substs<'tcx>>
🔬 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?
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: ItemLocalMap<Vec<Adjustment<'tcx>>>
🔬 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?
pat_binding_modes: ItemLocalMap<BindingMode>
🔬 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?
Stores the actual binding mode for all instances of hir::BindingAnnotation.
pat_adjustments: ItemLocalMap<Vec<Ty<'tcx>>>
🔬 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?
Stores the types which were implicitly dereferenced in pattern binding modes for later usage in HAIR lowering. For example,
match &&Some(5i32) { Some(n) => {}, _ => {}, }
leads to a vec![&&Option<i32>, &Option<i32>]
. Empty vectors are not stored.
See: https://github.com/rust-lang/rfcs/blob/master/text/2005-match-ergonomics.md#definitions
upvar_capture_map: UpvarCaptureMap<'tcx>
🔬 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?
Borrows
closure_kind_origins: ItemLocalMap<(Span, Name)>
🔬 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?
Records the reasons that we picked the kind of each closure; not all closures are present in the map.
liberated_fn_sigs: ItemLocalMap<FnSig<'tcx>>
🔬 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?
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: ItemLocalMap<Vec<Ty<'tcx>>>
🔬 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?
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: ItemLocalMap<CastKind>
🔬 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?
Maps a cast expression to its kind. This is keyed on the from expression of the cast, not the cast itself.
used_trait_imports: Lrc<DefIdSet>
🔬 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?
Set of trait imports actually used in the method resolution.
This is used for warning unused imports. During type
checking, this Lrc
should not be cloned: it must have a ref-count
of 1 so that we can insert things into the set mutably.
tainted_by_errors: bool
🔬 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?
If any errors occurred while type-checking this body,
this field will be set to true
.
free_region_map: FreeRegionMap<'tcx>
🔬 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?
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]
impl<'tcx> TypeckTables<'tcx>
pub fn empty(local_id_root: Option<DefId>) -> TypeckTables<'tcx>
[src]
pub fn empty(local_id_root: Option<DefId>) -> TypeckTables<'tcx>
🔬 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?
pub fn qpath_def(&self, qpath: &QPath, id: HirId) -> Def
[src]
pub fn qpath_def(&self, qpath: &QPath, id: HirId) -> Def
🔬 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?
Returns the final resolution of a QPath
in an Expr
or Pat
node.
pub fn type_dependent_defs(&self) -> LocalTableInContext<Def>
[src]
pub fn type_dependent_defs(&self) -> LocalTableInContext<Def>
🔬 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?
pub fn type_dependent_defs_mut(&mut self) -> LocalTableInContextMut<Def>
[src]
pub fn type_dependent_defs_mut(&mut self) -> LocalTableInContextMut<Def>
🔬 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?
pub fn field_indices(&self) -> LocalTableInContext<usize>
[src]
pub fn field_indices(&self) -> LocalTableInContext<usize>
🔬 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?
pub fn field_indices_mut(&mut self) -> LocalTableInContextMut<usize>
[src]
pub fn field_indices_mut(&mut self) -> LocalTableInContextMut<usize>
🔬 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?
pub fn user_provided_tys(&self) -> LocalTableInContext<CanonicalTy<'tcx>>
[src]
pub fn user_provided_tys(&self) -> LocalTableInContext<CanonicalTy<'tcx>>
🔬 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?
pub fn user_provided_tys_mut(
&mut self
) -> LocalTableInContextMut<CanonicalTy<'tcx>>
[src]
pub fn user_provided_tys_mut(
&mut self
) -> LocalTableInContextMut<CanonicalTy<'tcx>>
🔬 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?
pub fn node_types(&self) -> LocalTableInContext<Ty<'tcx>>
[src]
pub fn node_types(&self) -> LocalTableInContext<Ty<'tcx>>
🔬 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?
pub fn node_types_mut(&mut self) -> LocalTableInContextMut<Ty<'tcx>>
[src]
pub fn node_types_mut(&mut self) -> LocalTableInContextMut<Ty<'tcx>>
🔬 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?
pub fn node_id_to_type(&self, id: HirId) -> Ty<'tcx>
[src]
pub fn node_id_to_type(&self, id: HirId) -> Ty<'tcx>
🔬 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?
pub fn node_id_to_type_opt(&self, id: HirId) -> Option<Ty<'tcx>>
[src]
pub fn node_id_to_type_opt(&self, id: HirId) -> Option<Ty<'tcx>>
🔬 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?
pub fn node_substs_mut(&mut self) -> LocalTableInContextMut<&'tcx Substs<'tcx>>
[src]
pub fn node_substs_mut(&mut self) -> LocalTableInContextMut<&'tcx Substs<'tcx>>
🔬 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?
pub fn node_substs(&self, id: HirId) -> &'tcx Substs<'tcx>
[src]
pub fn node_substs(&self, id: HirId) -> &'tcx Substs<'tcx>
🔬 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?
pub fn node_substs_opt(&self, id: HirId) -> Option<&'tcx Substs<'tcx>>
[src]
pub fn node_substs_opt(&self, id: HirId) -> Option<&'tcx Substs<'tcx>>
🔬 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?
pub fn pat_ty(&self, pat: &Pat) -> Ty<'tcx>
[src]
pub fn pat_ty(&self, pat: &Pat) -> Ty<'tcx>
🔬 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?
pub fn pat_ty_opt(&self, pat: &Pat) -> Option<Ty<'tcx>>
[src]
pub fn pat_ty_opt(&self, pat: &Pat) -> Option<Ty<'tcx>>
🔬 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?
pub fn expr_ty(&self, expr: &Expr) -> Ty<'tcx>
[src]
pub fn expr_ty(&self, expr: &Expr) -> Ty<'tcx>
🔬 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?
pub fn expr_ty_opt(&self, expr: &Expr) -> Option<Ty<'tcx>>
[src]
pub fn expr_ty_opt(&self, expr: &Expr) -> Option<Ty<'tcx>>
🔬 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?
pub fn adjustments(&self) -> LocalTableInContext<Vec<Adjustment<'tcx>>>
[src]
pub fn adjustments(&self) -> LocalTableInContext<Vec<Adjustment<'tcx>>>
🔬 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?
pub fn adjustments_mut(
&mut self
) -> LocalTableInContextMut<Vec<Adjustment<'tcx>>>
[src]
pub fn adjustments_mut(
&mut self
) -> LocalTableInContextMut<Vec<Adjustment<'tcx>>>
🔬 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?
pub fn expr_adjustments(&self, expr: &Expr) -> &[Adjustment<'tcx>]
[src]
pub fn expr_adjustments(&self, expr: &Expr) -> &[Adjustment<'tcx>]
🔬 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?
pub fn expr_ty_adjusted(&self, expr: &Expr) -> Ty<'tcx>
[src]
pub fn expr_ty_adjusted(&self, expr: &Expr) -> Ty<'tcx>
🔬 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?
Returns the type of expr
, considering any Adjustment
entry recorded for that expression.
pub fn expr_ty_adjusted_opt(&self, expr: &Expr) -> Option<Ty<'tcx>>
[src]
pub fn expr_ty_adjusted_opt(&self, expr: &Expr) -> Option<Ty<'tcx>>
🔬 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?
pub fn is_method_call(&self, expr: &Expr) -> bool
[src]
pub fn is_method_call(&self, expr: &Expr) -> bool
🔬 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?
pub fn pat_binding_modes(&self) -> LocalTableInContext<BindingMode>
[src]
pub fn pat_binding_modes(&self) -> LocalTableInContext<BindingMode>
🔬 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?
pub fn pat_binding_modes_mut(&mut self) -> LocalTableInContextMut<BindingMode>
[src]
pub fn pat_binding_modes_mut(&mut self) -> LocalTableInContextMut<BindingMode>
🔬 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?
pub fn pat_adjustments(&self) -> LocalTableInContext<Vec<Ty<'tcx>>>
[src]
pub fn pat_adjustments(&self) -> LocalTableInContext<Vec<Ty<'tcx>>>
🔬 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?
pub fn pat_adjustments_mut(&mut self) -> LocalTableInContextMut<Vec<Ty<'tcx>>>
[src]
pub fn pat_adjustments_mut(&mut self) -> LocalTableInContextMut<Vec<Ty<'tcx>>>
🔬 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?
pub fn upvar_capture(&self, upvar_id: UpvarId) -> UpvarCapture<'tcx>
[src]
pub fn upvar_capture(&self, upvar_id: UpvarId) -> UpvarCapture<'tcx>
🔬 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?
pub fn closure_kind_origins(&self) -> LocalTableInContext<(Span, Name)>
[src]
pub fn closure_kind_origins(&self) -> LocalTableInContext<(Span, Name)>
🔬 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?
pub fn closure_kind_origins_mut(
&mut self
) -> LocalTableInContextMut<(Span, Name)>
[src]
pub fn closure_kind_origins_mut(
&mut self
) -> LocalTableInContextMut<(Span, Name)>
🔬 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?
pub fn liberated_fn_sigs(&self) -> LocalTableInContext<FnSig<'tcx>>
[src]
pub fn liberated_fn_sigs(&self) -> LocalTableInContext<FnSig<'tcx>>
🔬 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?
pub fn liberated_fn_sigs_mut(&mut self) -> LocalTableInContextMut<FnSig<'tcx>>
[src]
pub fn liberated_fn_sigs_mut(&mut self) -> LocalTableInContextMut<FnSig<'tcx>>
🔬 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?
pub fn fru_field_types(&self) -> LocalTableInContext<Vec<Ty<'tcx>>>
[src]
pub fn fru_field_types(&self) -> LocalTableInContext<Vec<Ty<'tcx>>>
🔬 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?
pub fn fru_field_types_mut(&mut self) -> LocalTableInContextMut<Vec<Ty<'tcx>>>
[src]
pub fn fru_field_types_mut(&mut self) -> LocalTableInContextMut<Vec<Ty<'tcx>>>
🔬 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?
pub fn cast_kinds(&self) -> LocalTableInContext<CastKind>
[src]
pub fn cast_kinds(&self) -> LocalTableInContext<CastKind>
🔬 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?
pub fn cast_kinds_mut(&mut self) -> LocalTableInContextMut<CastKind>
[src]
pub fn cast_kinds_mut(&mut self) -> LocalTableInContextMut<CastKind>
🔬 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?
Trait Implementations
impl<'tcx> Encodable for TypeckTables<'tcx>
[src]
impl<'tcx> Encodable for TypeckTables<'tcx>
fn encode<__S: Encoder>(&self, s: &mut __S) -> Result<(), __S::Error>
[src]
fn encode<__S: Encoder>(&self, s: &mut __S) -> Result<(), __S::Error>
🔬 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?
impl<'tcx> Decodable for TypeckTables<'tcx>
[src]
impl<'tcx> Decodable for TypeckTables<'tcx>
fn decode<__D: Decoder>(d: &mut __D) -> Result<TypeckTables<'tcx>, __D::Error>
[src]
fn decode<__D: Decoder>(d: &mut __D) -> Result<TypeckTables<'tcx>, __D::Error>
🔬 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?
impl<'tcx> Debug for TypeckTables<'tcx>
[src]
impl<'tcx> Debug for TypeckTables<'tcx>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a, 'gcx> HashStable<StableHashingContext<'a>> for TypeckTables<'gcx>
[src]
impl<'a, 'gcx> HashStable<StableHashingContext<'a>> for TypeckTables<'gcx>
fn hash_stable<W: StableHasherResult>(
&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>
)
[src]
fn hash_stable<W: StableHasherResult>(
&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>
)
🔬 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?
Auto Trait Implementations
impl<'tcx> !Send for TypeckTables<'tcx>
impl<'tcx> !Send for TypeckTables<'tcx>
impl<'tcx> !Sync for TypeckTables<'tcx>
impl<'tcx> !Sync for TypeckTables<'tcx>