pub type Value<'tcx> = ImplPolarity;

Aliased Type§

enum Value<'tcx> {
    Positive,
    Negative,
    Reservation,
}

Variants§

§

Positive

impl Trait for Type

§

Negative

impl !Trait for Type

§

Reservation

#[rustc_reservation_impl] impl Trait for Type

This is a “stability hack”, not a real Rust feature. See #64631 for details.

Implementations§

source§

impl ImplPolarity

source

pub fn flip(&self) -> Option<ImplPolarity>

Flips polarity by turning Positive into Negative and Negative into Positive.

Trait Implementations§

source§

impl Clone for ImplPolarity

source§

fn clone(&self) -> ImplPolarity

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ImplPolarity

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'tcx, __D: TyDecoder<I = TyCtxt<'tcx>>> Decodable<__D> for ImplPolarity

source§

fn decode(__decoder: &mut __D) -> Self

source§

impl Display for ImplPolarity

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'tcx, __E: TyEncoder<I = TyCtxt<'tcx>>> Encodable<__E> for ImplPolarity

source§

fn encode(&self, __encoder: &mut __E)

source§

impl EraseType for ImplPolarity

§

type Result = [u8; 1]

source§

impl Hash for ImplPolarity

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<'__ctx> HashStable<StableHashingContext<'__ctx>> for ImplPolarity

source§

fn hash_stable( &self, __hcx: &mut StableHashingContext<'__ctx>, __hasher: &mut StableHasher )

source§

impl<'tcx> Lift<'tcx> for ImplPolarity

§

type Lifted = ImplPolarity

source§

fn lift_to_tcx(self, _: TyCtxt<'tcx>) -> Option<Self>

source§

impl ParameterizedOverTcx for ImplPolarity

§

type Value<'tcx> = ImplPolarity

source§

impl PartialEq<ImplPolarity> for ImplPolarity

source§

fn eq(&self, other: &ImplPolarity) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'tcx> Relate<'tcx> for ImplPolarity

source§

impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ImplPolarity

source§

fn try_fold_with<__F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, __folder: &mut __F ) -> Result<Self, __F::Error>

The entry point for folding. To fold a value t with a folder f call: t.try_fold_with(f). Read more
source§

fn fold_with<F>(self, folder: &mut F) -> Selfwhere F: TypeFolder<I>,

A convenient alternative to try_fold_with for use with infallible folders. Do not override this method, to ensure coherence with try_fold_with.
source§

impl<'tcx> TypeVisitable<TyCtxt<'tcx>> for ImplPolarity

source§

fn visit_with<__V: TypeVisitor<TyCtxt<'tcx>>>( &self, __visitor: &mut __V ) -> ControlFlow<__V::BreakTy>

The entry point for visiting. To visit a value t with a visitor v call: t.visit_with(v). Read more
source§

impl Copy for ImplPolarity

source§

impl Eq for ImplPolarity

source§

impl StructuralEq for ImplPolarity

source§

impl StructuralPartialEq for ImplPolarity

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:1 byte

Size for each variant:

  • Positive: 0 bytes
  • Negative: 0 bytes
  • Reservation: 0 bytes