]>
git.proxmox.com Git - rustc.git/blob - src/librustc_hir/arena.rs
1 /// This declares a list of types which can be allocated by `Arena`.
3 /// The `few` modifier will cause allocation to use the shared arena and recording the destructor.
4 /// This is faster and more memory efficient if there's only a few allocations of the type.
5 /// Leaving `few` out will cause the type to get its own dedicated `TypedArena` which is
6 /// faster and more memory efficient if there is lots of allocations.
8 /// Specifying the `decode` modifier will add decode impls for `&T` and `&[T]`,
9 /// where `T` is the type listed. These impls will appear in the implement_ty_decoder! macro.
11 macro_rules
! arena_types
{
12 ($
macro:path
, $args
:tt
, $tcx
:lifetime
) => (
15 [few
] hir_krate
: rustc_hir
::Crate
<$tcx
>,
16 [] arm
: rustc_hir
::Arm
<$tcx
>,
17 [] asm_operand
: rustc_hir
::InlineAsmOperand
<$tcx
>,
18 [] asm_template
: rustc_ast
::InlineAsmTemplatePiece
,
19 [] attribute
: rustc_ast
::Attribute
,
20 [] block
: rustc_hir
::Block
<$tcx
>,
21 [] bare_fn_ty
: rustc_hir
::BareFnTy
<$tcx
>,
22 [few
] global_asm
: rustc_hir
::GlobalAsm
,
23 [] generic_arg
: rustc_hir
::GenericArg
<$tcx
>,
24 [] generic_args
: rustc_hir
::GenericArgs
<$tcx
>,
25 [] generic_bound
: rustc_hir
::GenericBound
<$tcx
>,
26 [] generic_param
: rustc_hir
::GenericParam
<$tcx
>,
27 [] expr
: rustc_hir
::Expr
<$tcx
>,
28 [] field
: rustc_hir
::Field
<$tcx
>,
29 [] field_pat
: rustc_hir
::FieldPat
<$tcx
>,
30 [] fn_decl
: rustc_hir
::FnDecl
<$tcx
>,
31 [] foreign_item
: rustc_hir
::ForeignItem
<$tcx
>,
32 [] impl_item_ref
: rustc_hir
::ImplItemRef
<$tcx
>,
33 [few
] inline_asm
: rustc_hir
::InlineAsm
<$tcx
>,
34 [few
] llvm_inline_asm
: rustc_hir
::LlvmInlineAsm
<$tcx
>,
35 [] local
: rustc_hir
::Local
<$tcx
>,
36 [few
] macro_def
: rustc_hir
::MacroDef
<$tcx
>,
37 [] param
: rustc_hir
::Param
<$tcx
>,
38 [] pat
: rustc_hir
::Pat
<$tcx
>,
39 [] path
: rustc_hir
::Path
<$tcx
>,
40 [] path_segment
: rustc_hir
::PathSegment
<$tcx
>,
41 [] poly_trait_ref
: rustc_hir
::PolyTraitRef
<$tcx
>,
42 [] qpath
: rustc_hir
::QPath
<$tcx
>,
43 [] stmt
: rustc_hir
::Stmt
<$tcx
>,
44 [] struct_field
: rustc_hir
::StructField
<$tcx
>,
45 [] trait_item_ref
: rustc_hir
::TraitItemRef
,
46 [] ty
: rustc_hir
::Ty
<$tcx
>,
47 [] type_binding
: rustc_hir
::TypeBinding
<$tcx
>,
48 [] variant
: rustc_hir
::Variant
<$tcx
>,
49 [] where_predicate
: rustc_hir
::WherePredicate
<$tcx
>,