Module rustc::infer [] [src]

Unstable (rustc_private)

See the Book for more information.

Reexports

pub use self::LateBoundRegionConversionTime::*;
pub use self::RegionVariableOrigin::*;
pub use self::SubregionOrigin::*;
pub use self::ValuePairs::*;
pub use ty::IntVarValue;
pub use self::region_inference::{GenericKind, VerifyBound};

Modules

bivariate [Unstable]

Applies the "bivariance relationship" to two types and/or regions. If (A,B) are bivariant then either A <: B or B <: A. It occurs when type/lifetime parameters are unconstrained. Usually this is an error, but we permit it in the specific case where a type parameter is constrained in a where-clause via an associated type.

combine [Unstable]
equate [Unstable]
error_reporting [Unstable]

Error Reporting Code for the inference engine

glb [Unstable]
lattice [Unstable]
lub [Unstable]
region_inference [Unstable]

See README.md

resolve [Unstable]
sub [Unstable]
type_variable [Unstable]
unify_key [Unstable]

Structs

CombinedSnapshot [Unstable]
InferCtxt [Unstable]
InferCtxtBuilder [Unstable]

Helper type of a temporary returned by tcx.infer_ctxt(...). Necessary because we can't write the following bound: F: for<'b, 'tcx> where 'gcx: 'tcx FnOnce(InferCtxt<'b, 'gcx, 'tcx>).

InferOk [Unstable]
TypeFreshener [Unstable]
TypeTrace [Unstable]

The trace designates the path through inference that we took to encounter an error or subtyping constraint.

Enums

FixupError [Unstable]
InferTables [Unstable]

A version of &ty::Tables which can be global or local. Only the local version supports borrow_mut.

LateBoundRegionConversionTime [Unstable]

Times when we replace late-bound regions with variables:

ParameterOrigin [Unstable]

Places that type/region parameters can appear.

RegionVariableOrigin [Unstable]

Reasons to create a region inference variable

SubregionOrigin [Unstable]

The origin of a r1 <= r2 constraint.

TypeOrigin [Unstable]

Why did we require that the two types be related?

ValuePairs [Unstable]

See error_reporting.rs for more details

Traits

TransNormalize [Unstable]

Helper trait for shortening the lifetimes inside a value for post-type-checking normalization.

Type Definitions

Bound [Unstable]
FixupResult [Unstable]
InferResult [Unstable]
SkolemizationMap [Unstable]

A map returned by skolemize_late_bound_regions() indicating the skolemized region that each late-bound region was replaced with.

UnitResult [Unstable]