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]

Object Safety§

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