rustc_infer::infer::relate

Module lattice

Source
Expand description

§Lattice variables

Generic code for operating on lattices of inference variables that are characterized by an upper- and lower-bound.

The code is defined quite generically so that it can be applied both to type variables, which represent types being inferred, and fn variables, which represent function types being inferred. (It may eventually be applied to their types as well.) In some cases, the functions are also generic with respect to the operation on the lattice (GLB vs LUB).

§Note

Although all the functions are generic, for simplicity, comments in the source code generally refer to type variables and the LUB operation.

Structs§

  • LatticeOp 🔒
    A greatest lower bound“ (common subtype) or least upper bound (common supertype).

Enums§