Type Alias rustc_middle::ty::TraitPredicate
source · pub type TraitPredicate<'tcx> = TraitPredicate<TyCtxt<'tcx>>;
Aliased Type§
struct TraitPredicate<'tcx> {
pub trait_ref: TraitRef<TyCtxt<'tcx>>,
pub polarity: PredicatePolarity,
}
Fields§
§trait_ref: TraitRef<TyCtxt<'tcx>>
§polarity: PredicatePolarity
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 predicates.)
If polarity is Reserved: that’s a bug.
Trait Implementations§
source§impl<'tcx, P: PrettyPrinter<'tcx>> Print<'tcx, P> for TraitPredicate<'tcx>
impl<'tcx, P: PrettyPrinter<'tcx>> Print<'tcx, P> for TraitPredicate<'tcx>
source§impl<'tcx> PrintTraitPredicateExt<'tcx> for TraitPredicate<'tcx>
impl<'tcx> PrintTraitPredicateExt<'tcx> for TraitPredicate<'tcx>
fn print_modifiers_and_trait_path(self) -> TraitPredPrintModifiersAndPath<'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: 24 bytes