rustc_trait_selection::infer::canonical::ir::inherent

Trait GenericArg

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§

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

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.

Implementations on Foreign Types§

Source§

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

Implementors§