Type Alias rustc_middle::query::queries::impl_polarity::ProvidedValue
source · pub type ProvidedValue<'tcx> = ImplPolarity;Expand description
This type alias specifies the type returned from query providers and the type
used for decoding. For regular queries this is the declared returned type V,
but arena_cache will use <V as Deref>::Target instead.
Aliased Type§
enum ProvidedValue<'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
impl ImplPolarity
sourcepub fn flip(&self) -> Option<ImplPolarity>
pub fn flip(&self) -> Option<ImplPolarity>
Flips polarity by turning Positive into Negative and Negative into Positive.
Trait Implementations§
source§impl Clone for ImplPolarity
impl Clone for ImplPolarity
source§fn clone(&self) -> ImplPolarity
fn clone(&self) -> ImplPolarity
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ImplPolarity
impl Debug for ImplPolarity
source§impl Display for ImplPolarity
impl Display for ImplPolarity
source§impl Hash for ImplPolarity
impl Hash for ImplPolarity
source§impl<'__ctx> HashStable<StableHashingContext<'__ctx>> for ImplPolarity
impl<'__ctx> HashStable<StableHashingContext<'__ctx>> for ImplPolarity
fn hash_stable( &self, __hcx: &mut StableHashingContext<'__ctx>, __hasher: &mut StableHasher )
source§impl<'tcx> Lift<'tcx> for ImplPolarity
impl<'tcx> Lift<'tcx> for ImplPolarity
type Lifted = ImplPolarity
fn lift_to_tcx(self, _: TyCtxt<'tcx>) -> Option<Self>
source§impl ParameterizedOverTcx for ImplPolarity
impl ParameterizedOverTcx for ImplPolarity
type Value<'tcx> = ImplPolarity
source§impl PartialEq<ImplPolarity> for ImplPolarity
impl PartialEq<ImplPolarity> for ImplPolarity
source§fn eq(&self, other: &ImplPolarity) -> bool
fn eq(&self, other: &ImplPolarity) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'tcx> Relate<'tcx> for ImplPolarity
impl<'tcx> Relate<'tcx> for ImplPolarity
fn relate<R: TypeRelation<'tcx>>( relation: &mut R, a: ImplPolarity, b: ImplPolarity ) -> RelateResult<'tcx, ImplPolarity>
source§impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ImplPolarity
impl<'tcx> TypeFoldable<TyCtxt<'tcx>> for ImplPolarity
source§fn try_fold_with<__F: FallibleTypeFolder<TyCtxt<'tcx>>>(
self,
__folder: &mut __F
) -> Result<Self, __F::Error>
fn try_fold_with<__F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, __folder: &mut __F ) -> Result<Self, __F::Error>
source§fn fold_with<F>(self, folder: &mut F) -> Selfwhere
F: TypeFolder<I>,
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
impl<'tcx> TypeVisitable<TyCtxt<'tcx>> for ImplPolarity
source§fn visit_with<__V: TypeVisitor<TyCtxt<'tcx>>>(
&self,
__visitor: &mut __V
) -> ControlFlow<__V::BreakTy>
fn visit_with<__V: TypeVisitor<TyCtxt<'tcx>>>( &self, __visitor: &mut __V ) -> ControlFlow<__V::BreakTy>
impl Copy for ImplPolarity
impl Eq for ImplPolarity
impl StructuralEq for ImplPolarity
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 bytesNegative: 0 bytesReservation: 0 bytes