Trait rustc_infer::traits::util::Elaboratable

source ·
pub trait Elaboratable<'tcx> {
    // Required methods
    fn predicate(&self) -> Predicate<'tcx>;
    fn child(&self, clause: Clause<'tcx>) -> Self;
    fn child_with_derived_cause(
        &self,
        clause: Clause<'tcx>,
        span: Span,
        parent_trait_pred: PolyTraitPredicate<'tcx>,
        index: usize,
    ) -> Self;
}
Expand description

Describes how to elaborate an obligation into a sub-obligation.

For Obligation, a sub-obligation is combined with the current obligation’s param-env and cause code. For ty::Predicate, none of this is needed, since there is no param-env or cause code to copy over.

Required Methods§

source

fn predicate(&self) -> Predicate<'tcx>

source

fn child(&self, clause: Clause<'tcx>) -> Self

source

fn child_with_derived_cause( &self, clause: Clause<'tcx>, span: Span, parent_trait_pred: PolyTraitPredicate<'tcx>, index: usize, ) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'tcx> Elaboratable<'tcx> for (Clause<'tcx>, Span)

source§

fn predicate(&self) -> Predicate<'tcx>

source§

fn child(&self, clause: Clause<'tcx>) -> Self

source§

fn child_with_derived_cause( &self, clause: Clause<'tcx>, _span: Span, _parent_trait_pred: PolyTraitPredicate<'tcx>, _index: usize, ) -> Self

source§

impl<'tcx> Elaboratable<'tcx> for (Predicate<'tcx>, Span)

source§

fn predicate(&self) -> Predicate<'tcx>

source§

fn child(&self, clause: Clause<'tcx>) -> Self

source§

fn child_with_derived_cause( &self, clause: Clause<'tcx>, _span: Span, _parent_trait_pred: PolyTraitPredicate<'tcx>, _index: usize, ) -> Self

source§

impl<'tcx> Elaboratable<'tcx> for Clause<'tcx>

source§

fn predicate(&self) -> Predicate<'tcx>

source§

fn child(&self, clause: Clause<'tcx>) -> Self

source§

fn child_with_derived_cause( &self, clause: Clause<'tcx>, _span: Span, _parent_trait_pred: PolyTraitPredicate<'tcx>, _index: usize, ) -> Self

source§

impl<'tcx> Elaboratable<'tcx> for Predicate<'tcx>

source§

fn predicate(&self) -> Predicate<'tcx>

source§

fn child(&self, clause: Clause<'tcx>) -> Self

source§

fn child_with_derived_cause( &self, clause: Clause<'tcx>, _span: Span, _parent_trait_pred: PolyTraitPredicate<'tcx>, _index: usize, ) -> Self

Implementors§

source§

impl<'tcx> Elaboratable<'tcx> for PredicateObligation<'tcx>