Struct rustc_hir::Arena

source ·
pub struct Arena<'tcx> {
Show 45 fields pub dropless: DroplessArena, pub(crate) hir_krate: TypedArena<Crate<'tcx>>, pub(crate) arm: TypedArena<Arm<'tcx>>, pub(crate) asm_operand: TypedArena<(InlineAsmOperand<'tcx>, Span)>, pub(crate) asm_template: TypedArena<InlineAsmTemplatePiece>, pub(crate) attribute: TypedArena<Attribute>, pub(crate) closure: TypedArena<Closure<'tcx>>, pub(crate) block: TypedArena<Block<'tcx>>, pub(crate) bare_fn_ty: TypedArena<BareFnTy<'tcx>>, pub(crate) body: TypedArena<Body<'tcx>>, pub(crate) generics: TypedArena<Generics<'tcx>>, pub(crate) generic_arg: TypedArena<GenericArg<'tcx>>, pub(crate) generic_args: TypedArena<GenericArgs<'tcx>>, pub(crate) generic_bound: TypedArena<GenericBound<'tcx>>, pub(crate) generic_param: TypedArena<GenericParam<'tcx>>, pub(crate) expr: TypedArena<Expr<'tcx>>, pub(crate) impl_: TypedArena<Impl<'tcx>>, pub(crate) let_expr: TypedArena<Let<'tcx>>, pub(crate) expr_field: TypedArena<ExprField<'tcx>>, pub(crate) pat_field: TypedArena<PatField<'tcx>>, pub(crate) fn_decl: TypedArena<FnDecl<'tcx>>, pub(crate) foreign_item: TypedArena<ForeignItem<'tcx>>, pub(crate) foreign_item_ref: TypedArena<ForeignItemRef>, pub(crate) impl_item: TypedArena<ImplItem<'tcx>>, pub(crate) impl_item_ref: TypedArena<ImplItemRef>, pub(crate) item: TypedArena<Item<'tcx>>, pub(crate) inline_asm: TypedArena<InlineAsm<'tcx>>, pub(crate) local: TypedArena<Local<'tcx>>, pub(crate) mod_: TypedArena<Mod<'tcx>>, pub(crate) owner_info: TypedArena<OwnerInfo<'tcx>>, pub(crate) param: TypedArena<Param<'tcx>>, pub(crate) pat: TypedArena<Pat<'tcx>>, pub(crate) path: TypedArena<Path<'tcx>>, pub(crate) use_path: TypedArena<UsePath<'tcx>>, pub(crate) path_segment: TypedArena<PathSegment<'tcx>>, pub(crate) poly_trait_ref: TypedArena<PolyTraitRef<'tcx>>, pub(crate) qpath: TypedArena<QPath<'tcx>>, pub(crate) stmt: TypedArena<Stmt<'tcx>>, pub(crate) field_def: TypedArena<FieldDef<'tcx>>, pub(crate) trait_item: TypedArena<TraitItem<'tcx>>, pub(crate) trait_item_ref: TypedArena<TraitItemRef>, pub(crate) ty: TypedArena<Ty<'tcx>>, pub(crate) type_binding: TypedArena<TypeBinding<'tcx>>, pub(crate) variant: TypedArena<Variant<'tcx>>, pub(crate) where_predicate: TypedArena<WherePredicate<'tcx>>,
}

Fields§

§dropless: DroplessArena§hir_krate: TypedArena<Crate<'tcx>>§arm: TypedArena<Arm<'tcx>>§asm_operand: TypedArena<(InlineAsmOperand<'tcx>, Span)>§asm_template: TypedArena<InlineAsmTemplatePiece>§attribute: TypedArena<Attribute>§closure: TypedArena<Closure<'tcx>>§block: TypedArena<Block<'tcx>>§bare_fn_ty: TypedArena<BareFnTy<'tcx>>§body: TypedArena<Body<'tcx>>§generics: TypedArena<Generics<'tcx>>§generic_arg: TypedArena<GenericArg<'tcx>>§generic_args: TypedArena<GenericArgs<'tcx>>§generic_bound: TypedArena<GenericBound<'tcx>>§generic_param: TypedArena<GenericParam<'tcx>>§expr: TypedArena<Expr<'tcx>>§impl_: TypedArena<Impl<'tcx>>§let_expr: TypedArena<Let<'tcx>>§expr_field: TypedArena<ExprField<'tcx>>§pat_field: TypedArena<PatField<'tcx>>§fn_decl: TypedArena<FnDecl<'tcx>>§foreign_item: TypedArena<ForeignItem<'tcx>>§foreign_item_ref: TypedArena<ForeignItemRef>§impl_item: TypedArena<ImplItem<'tcx>>§impl_item_ref: TypedArena<ImplItemRef>§item: TypedArena<Item<'tcx>>§inline_asm: TypedArena<InlineAsm<'tcx>>§local: TypedArena<Local<'tcx>>§mod_: TypedArena<Mod<'tcx>>§owner_info: TypedArena<OwnerInfo<'tcx>>§param: TypedArena<Param<'tcx>>§pat: TypedArena<Pat<'tcx>>§path: TypedArena<Path<'tcx>>§use_path: TypedArena<UsePath<'tcx>>§path_segment: TypedArena<PathSegment<'tcx>>§poly_trait_ref: TypedArena<PolyTraitRef<'tcx>>§qpath: TypedArena<QPath<'tcx>>§stmt: TypedArena<Stmt<'tcx>>§field_def: TypedArena<FieldDef<'tcx>>§trait_item: TypedArena<TraitItem<'tcx>>§trait_item_ref: TypedArena<TraitItemRef>§ty: TypedArena<Ty<'tcx>>§type_binding: TypedArena<TypeBinding<'tcx>>§variant: TypedArena<Variant<'tcx>>§where_predicate: TypedArena<WherePredicate<'tcx>>

Implementations§

source§

impl<'tcx> Arena<'tcx>

source

pub fn alloc<T: ArenaAllocatable<'tcx, C>, C>(&self, value: T) -> &mut T

source

pub fn alloc_slice<T: Copy>(&self, value: &[T]) -> &mut [T]

source

pub fn alloc_from_iter<'a, T: ArenaAllocatable<'tcx, C>, C>(
    &'a self,
    iter: impl IntoIterator<Item = T>
) -> &'a mut [T]

Trait Implementations§

source§

impl<'tcx> Default for Arena<'tcx>

source§

fn default() -> Arena<'tcx>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'tcx> !RefUnwindSafe for Arena<'tcx>

§

impl<'tcx> !Send for Arena<'tcx>

§

impl<'tcx> !Sync for Arena<'tcx>

§

impl<'tcx> Unpin for Arena<'tcx>

§

impl<'tcx> !UnwindSafe for Arena<'tcx>

Blanket Implementations§

source§

impl<T> Any for Twhere
    T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere
    U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere
    U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
    U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 2160 bytes