rustc_middle::ty::generic_args

Type Alias GenericArgKind

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

Aliased Type§

enum GenericArgKind<'tcx> {
    Lifetime(Region<'tcx>),
    Type(Ty<'tcx>),
    Const(Const<'tcx>),
}

Variants§

§

Lifetime(Region<'tcx>)

§

Type(Ty<'tcx>)

§

Const(Const<'tcx>)

Trait Implementations§

Source§

impl<'tcx> GenericArgPackExt<'tcx> for GenericArgKind<'tcx>

Source§

fn pack(self) -> GenericArg<'tcx>

§

impl<I> Clone for GenericArgKind<I>
where I: Interner,

§

fn clone(&self) -> GenericArgKind<I>

Returns a copy of the value. Read more
Source§

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

Performs copy-assignment from source. Read more
§

impl<I> Debug for GenericArgKind<I>
where I: Interner,

§

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

Formats the value using the given formatter. Read more
§

impl<I, __D> Decodable<__D> for GenericArgKind<I>
where I: Interner, __D: TyDecoder<I = I>, <I as Interner>::Region: Decodable<__D>, <I as Interner>::Ty: Decodable<__D>, <I as Interner>::Const: Decodable<__D>,

§

fn decode(__decoder: &mut __D) -> GenericArgKind<I>

§

impl<I, __E> Encodable<__E> for GenericArgKind<I>
where I: Interner, __E: TyEncoder<I = I>, <I as Interner>::Region: Encodable<__E>, <I as Interner>::Ty: Encodable<__E>, <I as Interner>::Const: Encodable<__E>,

§

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

§

impl<I, __CTX> HashStable<__CTX> for GenericArgKind<I>
where I: Interner, <I as Interner>::Region: HashStable<__CTX>, <I as Interner>::Ty: HashStable<__CTX>, <I as Interner>::Const: HashStable<__CTX>,

§

fn hash_stable( &self, __hcx: &mut __CTX, __hasher: &mut StableHasher<SipHasher128>, )

§

impl<I> PartialEq for GenericArgKind<I>
where I: Interner,

§

fn eq(&self, __other: &GenericArgKind<I>) -> bool

Tests for self and other values to be equal, and is used by ==.
Source§

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

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

impl<I> Copy for GenericArgKind<I>
where I: Interner,

§

impl<I> Eq for GenericArgKind<I>
where I: Interner,

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

Size for each variant:

  • Lifetime: 8 bytes
  • Type: 8 bytes
  • Const: 8 bytes