Skip to main content

PredicateEmittingRelation

Trait PredicateEmittingRelation 

Source
pub trait PredicateEmittingRelation<Infcx, I = I>: TypeRelation<I>
where Infcx: InferCtxtLike<Interner = I>, I: Interner,
{ // Required methods fn span(&self) -> <I as Interner>::Span; fn param_env(&self) -> <I as Interner>::ParamEnv; fn structurally_relate_aliases(&self) -> StructurallyRelateAliases; fn register_goals( &mut self, obligations: impl IntoIterator<Item = Goal<I, <I as Interner>::Predicate>>, ); fn register_predicates( &mut self, obligations: impl IntoIterator>, ) where <impl IntoIterator as IntoIterator>::Item: Upcast<I, <I as Interner>::Predicate>; fn ambient_variance(&self) -> Variance; }

Required Methods§

Source

fn span(&self) -> <I as Interner>::Span

Source

fn param_env(&self) -> <I as Interner>::ParamEnv

Source

fn structurally_relate_aliases(&self) -> StructurallyRelateAliases

Whether aliases should be related structurally. This is pretty much always No unless you’re equating in some specific locations of the new solver. See the comments in these use-cases for more details.

Source

fn register_goals( &mut self, obligations: impl IntoIterator<Item = Goal<I, <I as Interner>::Predicate>>, )

Register obligations that must hold in order for this relation to hold

Source

fn register_predicates( &mut self, obligations: impl IntoIterator>, )
where <impl IntoIterator as IntoIterator>::Item: Upcast<I, <I as Interner>::Predicate>,

Register predicates that must hold in order for this relation to hold. This uses the default param_env of the obligation.

Source

fn ambient_variance(&self) -> Variance

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'tcx> PredicateEmittingRelation<InferCtxt<'tcx>> for LatticeOp<'_, 'tcx>

Source§

impl<'tcx> PredicateEmittingRelation<InferCtxt<'tcx>> for TypeRelating<'_, 'tcx>

Source§

impl<Infcx, I> PredicateEmittingRelation<Infcx> for SolverRelating<'_, Infcx, I>
where Infcx: InferCtxtLike<Interner = I>, I: Interner,