rustc_type_ir::inherent

Trait GenericArgs

Source
pub trait GenericArgs<I: Interner<GenericArgs = Self>>:
    Copy
    + Debug
    + Hash
    + Eq
    + SliceLike<Item = I::GenericArg>
    + Default
    + Relate<I> {
    // Required methods
    fn rebase_onto(
        self,
        interner: I,
        source_def_id: I::DefId,
        target: I::GenericArgs,
    ) -> I::GenericArgs;
    fn type_at(self, i: usize) -> I::Ty;
    fn region_at(self, i: usize) -> I::Region;
    fn const_at(self, i: usize) -> I::Const;
    fn identity_for_item(interner: I, def_id: I::DefId) -> I::GenericArgs;
    fn extend_with_error(
        interner: I,
        def_id: I::DefId,
        original_args: &[I::GenericArg],
    ) -> I::GenericArgs;
    fn split_closure_args(self) -> ClosureArgsParts<I>;
    fn split_coroutine_closure_args(self) -> CoroutineClosureArgsParts<I>;
    fn split_coroutine_args(self) -> CoroutineArgsParts<I>;

    // Provided methods
    fn as_closure(self) -> ClosureArgs<I> { ... }
    fn as_coroutine_closure(self) -> CoroutineClosureArgs<I> { ... }
    fn as_coroutine(self) -> CoroutineArgs<I> { ... }
}

Required Methods§

Source

fn rebase_onto( self, interner: I, source_def_id: I::DefId, target: I::GenericArgs, ) -> I::GenericArgs

Source

fn type_at(self, i: usize) -> I::Ty

Source

fn region_at(self, i: usize) -> I::Region

Source

fn const_at(self, i: usize) -> I::Const

Source

fn identity_for_item(interner: I, def_id: I::DefId) -> I::GenericArgs

Source

fn extend_with_error( interner: I, def_id: I::DefId, original_args: &[I::GenericArg], ) -> I::GenericArgs

Source

fn split_closure_args(self) -> ClosureArgsParts<I>

Source

fn split_coroutine_closure_args(self) -> CoroutineClosureArgsParts<I>

Source

fn split_coroutine_args(self) -> CoroutineArgsParts<I>

Provided Methods§

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§