rustc_middle::ty::inherent

Trait GenericArg

Source
pub trait GenericArg<I>:
    Copy
    + Debug
    + Hash
    + Eq
    + IntoKind<Kind = GenericArgKind<I>>
    + TypeVisitable<I>
    + Relate<I>
    + From<<I as Interner>::Ty>
    + From<<I as Interner>::Region>
    + From<<I as Interner>::Const>
where I: Interner<GenericArg = Self>,
{ // Provided methods fn as_type(&self) -> Option<<I as Interner>::Ty> { ... } fn expect_ty(&self) -> <I as Interner>::Ty { ... } fn as_const(&self) -> Option<<I as Interner>::Const> { ... } fn expect_const(&self) -> <I as Interner>::Const { ... } fn as_region(&self) -> Option<<I as Interner>::Region> { ... } fn expect_region(&self) -> <I as Interner>::Region { ... } fn is_non_region_infer(self) -> bool { ... } }

Provided Methods§

Source

fn as_type(&self) -> Option<<I as Interner>::Ty>

Source

fn expect_ty(&self) -> <I as Interner>::Ty

Source

fn as_const(&self) -> Option<<I as Interner>::Const>

Source

fn expect_const(&self) -> <I as Interner>::Const

Source

fn as_region(&self) -> Option<<I as Interner>::Region>

Source

fn expect_region(&self) -> <I as Interner>::Region

Source

fn is_non_region_infer(self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'tcx> GenericArg<TyCtxt<'tcx>> for GenericArg<'tcx>