[][src]Module rustc_mir::borrow_check::nll::type_check

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

This pass type-checks the MIR to ensure it is not broken.

Modules

constraint_conversionInternal
free_region_relationsInternal
input_outputInternal

This module contains code to equate the input/output types appearing in the MIR with the expected input/output types from the function signature. This requires a bit of processing, as the expected types are supplied to us before normalization and may contain existential impl Trait instances. In contrast, the input/output types found in the MIR (specifically, in the special local variables for the RETURN_PLACE the MIR arguments) are always fully normalized (and contain revealed impl Trait values).

livenessInternal
relate_tysInternal

Structs

BorrowCheckContextInternal
MirTypeckRegionConstraintsInternal

A collection of region constraints that must be satisfied for the program to be considered well-typed.

MirTypeckResultsInternal
ObligationAccumulatorInternal
TypeCheckerInternal

The MIR type checker. Visits the MIR and enforces all the constraints needed for it to be valid and well-typed. Along the way, it accrues region constraints -- these can later be used by NLL region checking.

TypeVerifierInternal

Verifies that MIR types are sane to not crash further checks.

Enums

FieldAccessErrorInternal
LocationsInternal

The Locations type summarizes where region constraints are required to hold. Normally, this is at a particular point which created the obligation, but for constraints that the user gave, we want the constraint to hold at all points.

Traits

NormalizeLocationInternal

Functions

mirbugInternal
translate_outlives_factsInternal
type_checkInternal

Type checks the given mir in the context of the inference context infcx. Returns any region constraints that have yet to be proven. This result is includes liveness constraints that ensure that regions appearing in the types of all local variables are live at all points where that local variable may later be used.

type_check_internalInternal