Expand description
Canonicalization is used to separate some goal from its context, throwing away unnecessary information in the process.
This is necessary to cache goals containing inference variables
and placeholders without restricting them to the current InferCtxt
.
Canonicalization is fairly involved, for more details see the relevant section of the rustc-dev-guide.
Modulesยง
Traitsยง
- ResponseT ๐
Functionsยง
- canonicalize_
goal ๐ - Canonicalizes the goal remembering the original values for each bound variable.
- canonicalize_
response ๐ - compute_
query_ ๐response_ instantiation_ values - This returns the canonical variable values to instantiate the bound variables of
the canonical response. This depends on the
original_values
for the bound variables. - instantiate_
and_ ๐apply_ query_ response - After calling a canonical query, we apply the constraints returned by the query using this function.
- instantiate_
canonical_ state - make_
canonical_ state - Used by proof trees to be able to recompute intermediate actions while
evaluating a goal. The
var_values
not only include the bound variables of the query input, but also contain all unconstrained inference vars created while evaluating this goal. - register_
new_ ๐opaque_ types - register_
region_ ๐constraints - response_
no_ constraints_ raw - unify_
query_ ๐var_ values - Unify the
original_values
with thevar_values
returned by the canonical query..