Skip to main content

TraitClause

Type Alias TraitClause 

Source
pub type TraitClause<'tcx> = TraitClause<TyCtxt<'tcx>>;

Aliased Type§

pub struct TraitClause<'tcx> {
    pub trait_ref: TraitRef<TyCtxt<'tcx>>,
    pub polarity: ClausePolarity,
}

Fields§

§trait_ref: TraitRef<TyCtxt<'tcx>>§polarity: ClausePolarity

If polarity is Positive: we are proving that the trait is implemented.

If polarity is Negative: we are proving that a negative impl of this trait exists. (Note that coherence also checks whether negative impls of supertraits exist via a series of clauses.)

Trait Implementations§

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: 24 bytes