Trait rustc_infer::infer::lattice::LatticeDir
source · pub trait LatticeDir<'f, 'tcx>: TypeRelation<'tcx> {
fn infcx(&self) -> &'f InferCtxt<'f, 'tcx>;
fn cause(&self) -> &ObligationCause<'tcx>;
fn add_obligations(&mut self, obligations: Vec<PredicateObligation<'tcx>>);
fn define_opaque_types(&self) -> bool;
fn relate_bound(
&mut self,
v: Ty<'tcx>,
a: Ty<'tcx>,
b: Ty<'tcx>
) -> RelateResult<'tcx, ()>;
}
Expand description
Trait for returning data about a lattice, and for abstracting over the “direction” of the lattice operation (LUB/GLB).
GLB moves “down” the lattice (to smaller values); LUB moves “up” the lattice (to bigger values).
Required Methods
source
fn cause(&self) -> &ObligationCause<'tcx>
source
fn add_obligations(&mut self, obligations: Vec<PredicateObligation<'tcx>>)
source
fn define_opaque_types(&self) -> bool
sourcefn relate_bound(