Struct rustc_save_analysis::ty::subst::GenericArg [−][src]
pub struct GenericArg<'tcx> {
ptr: NonZeroUsize,
marker: PhantomData<(&'tcx TyS<'tcx>, &'tcx RegionKind, &'tcx Const<'tcx>)>,
}Expand description
An entity in the Rust type system, which can be one of
several kinds (types, lifetimes, and consts).
To reduce memory usage, a GenericArg is an interned pointer,
with the lowest 2 bits being reserved for a tag to
indicate the type (Ty, Region, or Const) it points to.
Fields
ptr: NonZeroUsizemarker: PhantomData<(&'tcx TyS<'tcx>, &'tcx RegionKind, &'tcx Const<'tcx>)>Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for GenericArg<'tcx>
impl<'tcx> !Send for GenericArg<'tcx>
impl<'tcx> !Sync for GenericArg<'tcx>
impl<'tcx> Unpin for GenericArg<'tcx>
impl<'tcx> !UnwindSafe for GenericArg<'tcx>
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn subst_spanned(
self,
tcx: TyCtxt<'tcx>,
substs: &[GenericArg<'tcx>],
span: Option<Span>
) -> T
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: 8 bytes