Module rustc_infer::infer::resolve

source ·

Structs§

  • Resolves ty, region, and const vars to their inferred values or their root vars.
  • 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.

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.