Trait rustc_infer::infer::relate::lattice::LatticeDir

source ·
pub trait LatticeDir<'f, 'tcx>: ObligationEmittingRelation<'tcx> {
    // Required methods
    fn infcx(&self) -> &'f InferCtxt<'tcx>;
    fn cause(&self) -> &ObligationCause<'tcx>;
    fn define_opaque_types(&self) -> DefineOpaqueTypes;
    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 infcx(&self) -> &'f InferCtxt<'tcx>

source

fn cause(&self) -> &ObligationCause<'tcx>

source

fn define_opaque_types(&self) -> DefineOpaqueTypes

source

fn relate_bound( &mut self, v: Ty<'tcx>, a: Ty<'tcx>, b: Ty<'tcx> ) -> RelateResult<'tcx, ()>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'combine, 'infcx, 'tcx> LatticeDir<'infcx, 'tcx> for Glb<'combine, 'infcx, 'tcx>

source§

impl<'combine, 'infcx, 'tcx> LatticeDir<'infcx, 'tcx> for Lub<'combine, 'infcx, 'tcx>