Module rustc::infer [] [src]

🔬 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?

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;

Modules

at [
Experimental
]

A nice interface for working with the infcx. The basic idea is to do infcx.at(cause, param_env), which sets the "cause" of the operation as well as the surrounding parameter environment. Then you can do something like .sub(a, b) or .eq(a, b) to create a subtype or equality relationship respectively. The first argument is always the "expected" output from the POV of diagnostics.

error_reporting [
Experimental
]

Error Reporting Code for the inference engine

lattice [
Experimental
]

Lattice Variables

This file contains generic code for operating on inference variables that are characterized by an upper- and lower-bound. The logic and reasoning is explained in detail in the large comment in infer.rs.

outlives [
Experimental
]

Various code related to computing outlives relations.

region_constraints [
Experimental
]

See README.md

resolve [
Experimental
]
type_variable [
Experimental
]
unify_key [
Experimental
]

Structs

CombinedSnapshot [
Experimental
]
InferCtxt [
Experimental
]
InferCtxtBuilder [
Experimental
]

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 [
Experimental
]
RegionObligation [
Experimental
]

See the region_obligations field for more information.

TypeFreshener [
Experimental
]
TypeTrace [
Experimental
]

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

Enums

FixupError [
Experimental
]
LateBoundRegionConversionTime [
Experimental
]

Times when we replace late-bound regions with variables:

NLLRegionVariableOrigin [
Experimental
]
ParameterOrigin [
Experimental
]

Places that type/region parameters can appear.

RegionVariableOrigin [
Experimental
]

Reasons to create a region inference variable

SubregionOrigin [
Experimental
]

The origin of a r1 <= r2 constraint.

ValuePairs [
Experimental
]

See error_reporting module for more details

Traits

TransNormalize [
Experimental
]

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

Type Definitions

Bound [
Experimental
]
FixupResult [
Experimental
]
InferResult [
Experimental
]
SkolemizationMap [
Experimental
]

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

UnitResult [
Experimental
]