Module rustc_infer::infer::relate
source · Expand description
This module contains the definitions of most TypeRelations in the type system
(except for some relations used for diagnostics and heuristics in the compiler).
Modules§
- combine 🔒There are four type combiners: Equate, Sub, Lub, and Glb. Each implements the trait TypeRelation and contains methods for combining two instances of various things and yielding a new instance. These combiner methods always yield a
Result<T>. To relate two types, you can useinfcx.at(cause, param_env)which then allows you to use the relevant methods of At. - equate 🔒
- glb 🔒Greatest lower bound. See
lattice. - Helper routines for higher-ranked things. See the
docmodule at the end of the file for details. - lattice 🔒Lattice variables
- lub 🔒Least upper bound. See
lattice. - sub 🔒
Enums§
- Whether aliases should be related structurally or not. Used to adjust the behavior of generalization and combine.