Struct rustc::middle::ty::GenericsUnstable [-] [+] [src]

pub struct Generics<'tcx> {
    pub types: VecPerParamSpace<TypeParameterDef<'tcx>>,
    pub regions: VecPerParamSpace<RegionParameterDef>,
}

Information about the formal type/lifetime parameters associated with an item or method. Analogous to ast::Generics.

Fields

types
regions

Methods

impl<'tcx> Generics<'tcx>

fn empty() -> Generics<'tcx>

fn is_empty(&self) -> bool

fn has_type_params(&self, space: ParamSpace) -> bool

fn has_region_params(&self, space: ParamSpace) -> bool

Trait Implementations

impl<'tcx> TypeFoldable<'tcx> for Generics<'tcx>

fn fold_with<F: TypeFolder<'tcx>>(&self, folder: &mut F) -> Generics<'tcx>

impl<'tcx> Repr<'tcx> for Generics<'tcx>

fn repr(&self, tcx: &ctxt<'tcx>) -> String

Derived Implementations

impl<'tcx> Debug for Generics<'tcx>

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl<'tcx> Clone for Generics<'tcx>

fn clone(&self) -> Generics<'tcx>

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