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 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 Attribute

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