]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_hir/src/arena.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / compiler / rustc_hir / src / arena.rs
CommitLineData
3c0e092e 1/// This higher-order macro declares a list of types which can be allocated by `Arena`.
ba9703b0 2///
f9f354fc
XL
3/// Specifying the `decode` modifier will add decode impls for `&T` and `&[T]`,
4/// where `T` is the type listed. These impls will appear in the implement_ty_decoder! macro.
ba9703b0
XL
5#[macro_export]
6macro_rules! arena_types {
3c0e092e 7 ($macro:path) => (
94222f64 8 $macro!([
ba9703b0 9 // HIR types
3c0e092e
XL
10 [] hir_krate: rustc_hir::Crate<'tcx>,
11 [] arm: rustc_hir::Arm<'tcx>,
064997fb 12 [] asm_operand: (rustc_hir::InlineAsmOperand<'tcx>, rustc_span::Span),
3dfed10e
XL
13 [] asm_template: rustc_ast::InlineAsmTemplatePiece,
14 [] attribute: rustc_ast::Attribute,
064997fb 15 [] closure: rustc_hir::Closure<'tcx>,
3c0e092e
XL
16 [] block: rustc_hir::Block<'tcx>,
17 [] bare_fn_ty: rustc_hir::BareFnTy<'tcx>,
18 [] body: rustc_hir::Body<'tcx>,
04454e1e 19 [] generics: rustc_hir::Generics<'tcx>,
3c0e092e
XL
20 [] generic_arg: rustc_hir::GenericArg<'tcx>,
21 [] generic_args: rustc_hir::GenericArgs<'tcx>,
22 [] generic_bound: rustc_hir::GenericBound<'tcx>,
23 [] generic_param: rustc_hir::GenericParam<'tcx>,
24 [] expr: rustc_hir::Expr<'tcx>,
04454e1e 25 [] impl_: rustc_hir::Impl<'tcx>,
a2a8927a 26 [] let_expr: rustc_hir::Let<'tcx>,
3c0e092e
XL
27 [] expr_field: rustc_hir::ExprField<'tcx>,
28 [] pat_field: rustc_hir::PatField<'tcx>,
29 [] fn_decl: rustc_hir::FnDecl<'tcx>,
30 [] foreign_item: rustc_hir::ForeignItem<'tcx>,
31 [] foreign_item_ref: rustc_hir::ForeignItemRef,
32 [] impl_item: rustc_hir::ImplItem<'tcx>,
c295e0f8 33 [] impl_item_ref: rustc_hir::ImplItemRef,
3c0e092e
XL
34 [] item: rustc_hir::Item<'tcx>,
35 [] inline_asm: rustc_hir::InlineAsm<'tcx>,
3c0e092e
XL
36 [] local: rustc_hir::Local<'tcx>,
37 [] mod_: rustc_hir::Mod<'tcx>,
38 [] owner_info: rustc_hir::OwnerInfo<'tcx>,
39 [] param: rustc_hir::Param<'tcx>,
40 [] pat: rustc_hir::Pat<'tcx>,
41 [] path: rustc_hir::Path<'tcx>,
487cf647 42 [] use_path: rustc_hir::UsePath<'tcx>,
3c0e092e
XL
43 [] path_segment: rustc_hir::PathSegment<'tcx>,
44 [] poly_trait_ref: rustc_hir::PolyTraitRef<'tcx>,
45 [] qpath: rustc_hir::QPath<'tcx>,
46 [] stmt: rustc_hir::Stmt<'tcx>,
47 [] field_def: rustc_hir::FieldDef<'tcx>,
48 [] trait_item: rustc_hir::TraitItem<'tcx>,
3dfed10e 49 [] trait_item_ref: rustc_hir::TraitItemRef,
3c0e092e
XL
50 [] ty: rustc_hir::Ty<'tcx>,
51 [] type_binding: rustc_hir::TypeBinding<'tcx>,
52 [] variant: rustc_hir::Variant<'tcx>,
53 [] where_predicate: rustc_hir::WherePredicate<'tcx>,
54 ]);
ba9703b0
XL
55 )
56}