Module rustc_trait_selection::infer::resolve
source · Structs
The opportunistic region resolver opportunistically resolves regions
variables to the variable with the least variable id. It is used when
normalizing projections to avoid hitting the recursion limit by creating
many versions of a predicate for types that in the end have to unify.
The opportunistic resolver can be used at any time. It simply replaces
type/const variables that have been unified with the things they have
been unified with (similar to
shallow_resolve
, but deep). This is
useful for printing messages etc but also required at various
points for correctness.The unresolved type finder walks a type searching for
type variables that don’t yet have a value. The first unresolved type is stored.
It does not construct the fully resolved type (which might
involve some hashing and so forth).
Functions
Full type resolution replaces all type and region variables with
their concrete results. If any variable cannot be replaced (never unified, etc)
then an
Err
result is returned.