Module rustc_middle::ty::context[][src]

Type context book-keeping.

Modules

tls

Structs

CanonicalUserTypeAnnotation
CommonConsts
CommonLifetimes
CommonTypes
CtxtInterners
DelaySpanBugEmitted

A type that is not publicly constructable. This prevents people from making TyKind::Errors except through the error-reporting functions on a tcx.

FreeRegionInfo
GeneratorInteriorTypeCause

Whenever a value may be live across a generator yield, the type of that value winds up in the GeneratorInteriorTypeCause struct. This struct adds additional information about such captured types that can be useful for diagnostics. In particular, it stores the span that caused a given type to be recorded, along with the scope that enclosed the value (which can be used to find the await that the value is live across).

GlobalCtxt
Interned

An entry in an interner.

LocalTableInContext
LocalTableInContextMut
ResolvedOpaqueTy

All information necessary to validate and reveal an impl Trait.

TyCtxt

The central data structure of the compiler. It stores references to the various arenas and also houses the results of the various compiler queries that have been performed. See the rustc dev guide for more details.

TypeckResults
UserTypeAnnotationIndex

Enums

UserType

A user-given type annotation attached to a constant. These arise from constants that are named via paths, like Foo::<A>::new and so forth.

Constants

START_INDEX

Traits

InternAs
InternIteratorElement
Lift

A trait implemented for all X<'a> types that can be safely and efficiently converted to X<'tcx> as long as they are part of the provided TyCtxt<'tcx>. This can be done, for example, for Ty<'tcx> or SubstsRef<'tcx> by looking them up in their respective interners.

Functions

invalid_hir_id_for_typeck_results
provide
ptr_eq
validate_hir_id_for_typeck_results

Validate that the given HirId (respectively its local_id part) can be safely used as a key in the maps of a TypeckResults. For that to be the case, the HirId must have the same owner as all the other IDs in this table (signified by hir_owner). Otherwise the HirId would be in a different frame of reference and using its local_id would result in lookup errors, or worse, in silently wrong data being stored/returned.

Type Definitions

CanonicalUserType

Canonicalized user type annotation.

CanonicalUserTypeAnnotations

Mapping of type annotation indices to canonical user type annotations.

InternedSet