rustc_hir

Trait ArenaAllocatable

source
pub trait ArenaAllocatable<'tcx, C = IsNotCopy>: Sized {
    // Required methods
    fn allocate_on(self, arena: &'tcx Arena<'tcx>) -> &'tcx mut Self;
    fn allocate_from_iter(
        arena: &'tcx Arena<'tcx>,
        iter: impl IntoIterator<Item = Self>,
    ) -> &'tcx mut [Self];
}

Required Methods§

source

fn allocate_on(self, arena: &'tcx Arena<'tcx>) -> &'tcx mut Self

source

fn allocate_from_iter( arena: &'tcx Arena<'tcx>, iter: impl IntoIterator<Item = Self>, ) -> &'tcx mut [Self]

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> ArenaAllocatable<'tcx> for InlineAsmTemplatePiece

source§

fn allocate_on(self, arena: &'tcx Arena<'tcx>) -> &'tcx mut Self

source§

fn allocate_from_iter( arena: &'tcx Arena<'tcx>, iter: impl IntoIterator<Item = Self>, ) -> &'tcx mut [Self]

source§

impl<'tcx> ArenaAllocatable<'tcx> for Attribute

source§

fn allocate_on(self, arena: &'tcx Arena<'tcx>) -> &'tcx mut Self

source§

fn allocate_from_iter( arena: &'tcx Arena<'tcx>, iter: impl IntoIterator<Item = Self>, ) -> &'tcx mut [Self]

source§

impl<'tcx> ArenaAllocatable<'tcx> for MacroDef

source§

fn allocate_on(self, arena: &'tcx Arena<'tcx>) -> &'tcx mut Self

source§

fn allocate_from_iter( arena: &'tcx Arena<'tcx>, iter: impl IntoIterator<Item = Self>, ) -> &'tcx mut [Self]

Implementors§

source§

impl<'tcx> ArenaAllocatable<'tcx> for OwnerInfo<'tcx>

source§

impl<'tcx> ArenaAllocatable<'tcx> for Lit

source§

impl<'tcx> ArenaAllocatable<'tcx> for UsePath<'tcx>

source§

impl<'tcx, T: Copy> ArenaAllocatable<'tcx, IsCopy> for T