rustc_type_ir::relate::combine

Trait PredicateEmittingRelation

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

Required Methods§

source

fn span(&self) -> I::Span

source

fn param_env(&self) -> I::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::Predicate>>, )

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

source

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

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

source

fn register_alias_relate_predicate(&mut self, a: I::Ty, b: I::Ty)

Register AliasRelate obligation(s) that both types must be related to each other.

Object Safety§

This trait is not object safe.

Implementors§

source§

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