rustc_middle::ty

Type Alias TermKind

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

Aliased Type§

enum TermKind<'tcx> {
    Ty(Ty<'tcx>),
    Const(Const<'tcx>),
}

Variants§

§

Ty(Ty<'tcx>)

§

Const(Const<'tcx>)

Trait Implementations§

Source§

impl<'tcx> TermKindPackExt<'tcx> for TermKind<'tcx>

Source§

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

§

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

§

fn clone(&self) -> TermKind<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 TermKind<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 TermKind<I>
where I: Interner, __D: TyDecoder<I = I>, <I as Interner>::Ty: Decodable<__D>, <I as Interner>::Const: Decodable<__D>,

§

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

§

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

§

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

§

impl<I, __CTX> HashStable<__CTX> for TermKind<I>
where I: Interner, <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 TermKind<I>
where I: Interner,

§

fn eq(&self, __other: &TermKind<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 TermKind<I>
where I: Interner,

§

impl<I> Eq for TermKind<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:

  • Ty: 8 bytes
  • Const: 8 bytes