pub trait PredicateEmittingRelation<'tcx>: TypeRelation<TyCtxt<'tcx>> {
// Required methods
fn span(&self) -> Span;
fn param_env(&self) -> ParamEnv<'tcx>;
fn structurally_relate_aliases(&self) -> StructurallyRelateAliases;
fn register_goals(
&mut self,
obligations: impl IntoIterator<Item = Goal<TyCtxt<'tcx>, Predicate<'tcx>>>,
);
fn register_predicates(
&mut self,
obligations: impl IntoIterator- , ty::Predicate<'tcx>>>,
)
where <impl IntoIterator as IntoIterator>::Item: Upcast<TyCtxt<'tcx>, Predicate<'tcx>>;
fn register_alias_relate_predicate(&mut self, a: Ty<'tcx>, b: Ty<'tcx>);
}
Required Methods§
fn span(&self) -> Span
fn param_env(&self) -> ParamEnv<'tcx>
sourcefn structurally_relate_aliases(&self) -> StructurallyRelateAliases
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.
sourcefn register_goals(
&mut self,
obligations: impl IntoIterator<Item = Goal<TyCtxt<'tcx>, Predicate<'tcx>>>,
)
fn register_goals( &mut self, obligations: impl IntoIterator<Item = Goal<TyCtxt<'tcx>, Predicate<'tcx>>>, )
Register obligations that must hold in order for this relation to hold
sourcefn register_predicates(
&mut self,
obligations: impl IntoIterator- , ty::Predicate<'tcx>>>,
)
fn register_predicates(
&mut self,
obligations: impl IntoIterator- , ty::Predicate<'tcx>>>,
)
Register predicates that must hold in order for this relation to hold.
This uses the default param_env
of the obligation.
sourcefn register_alias_relate_predicate(&mut self, a: Ty<'tcx>, b: Ty<'tcx>)
fn register_alias_relate_predicate(&mut self, a: Ty<'tcx>, b: Ty<'tcx>)
Register AliasRelate
obligation(s) that both types must be related to each other.
Object Safety§
This trait is not object safe.