Type Definition rustc_infer::traits::TraitObligation

source ·
pub type TraitObligation<'tcx> = Obligation<'tcx, PolyTraitPredicate<'tcx>>;

Implementations§

source§

impl<'tcx> TraitObligation<'tcx>

source

pub fn is_const(&self) -> bool

Returns true if the trait predicate is considered const in its ParamEnv.

source

pub fn derived_cause( &self, variant: impl FnOnce(DerivedObligationCause<'tcx>) -> ObligationCauseCode<'tcx> ) -> ObligationCause<'tcx>

source§

impl<'tcx> TraitObligation<'tcx>

source

pub fn polarity(&self) -> ImplPolarity

source

pub fn self_ty(&self) -> Binder<'tcx, Ty<'tcx>>

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size:72 bytes