]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_hir/src/arena.rs
Rollup merge of #96752 - scottmcm:error-sorting, r=compiler-errors
[rust.git] / compiler / rustc_hir / src / arena.rs
1 /// This higher-order macro declares a list of types which can be allocated by `Arena`.
2 ///
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.
5 #[macro_export]
6 macro_rules! arena_types {
7     ($macro:path) => (
8         $macro!([
9             // HIR types
10             [] hir_krate: rustc_hir::Crate<'tcx>,
11             [] arm: rustc_hir::Arm<'tcx>,
12             [] asm_operand: (rustc_hir::InlineAsmOperand<'tcx>, Span),
13             [] asm_template: rustc_ast::InlineAsmTemplatePiece,
14             [] attribute: rustc_ast::Attribute,
15             [] block: rustc_hir::Block<'tcx>,
16             [] bare_fn_ty: rustc_hir::BareFnTy<'tcx>,
17             [] body: rustc_hir::Body<'tcx>,
18             [] generics: rustc_hir::Generics<'tcx>,
19             [] generic_arg: rustc_hir::GenericArg<'tcx>,
20             [] generic_args: rustc_hir::GenericArgs<'tcx>,
21             [] generic_bound: rustc_hir::GenericBound<'tcx>,
22             [] generic_param: rustc_hir::GenericParam<'tcx>,
23             [] expr: rustc_hir::Expr<'tcx>,
24             [] impl_: rustc_hir::Impl<'tcx>,
25             [] let_expr: rustc_hir::Let<'tcx>,
26             [] expr_field: rustc_hir::ExprField<'tcx>,
27             [] pat_field: rustc_hir::PatField<'tcx>,
28             [] fn_decl: rustc_hir::FnDecl<'tcx>,
29             [] foreign_item: rustc_hir::ForeignItem<'tcx>,
30             [] foreign_item_ref: rustc_hir::ForeignItemRef,
31             [] impl_item: rustc_hir::ImplItem<'tcx>,
32             [] impl_item_ref: rustc_hir::ImplItemRef,
33             [] item: rustc_hir::Item<'tcx>,
34             [] inline_asm: rustc_hir::InlineAsm<'tcx>,
35             [] local: rustc_hir::Local<'tcx>,
36             [] mod_: rustc_hir::Mod<'tcx>,
37             [] owner_info: rustc_hir::OwnerInfo<'tcx>,
38             [] param: rustc_hir::Param<'tcx>,
39             [] pat: rustc_hir::Pat<'tcx>,
40             [] path: rustc_hir::Path<'tcx>,
41             [] path_segment: rustc_hir::PathSegment<'tcx>,
42             [] poly_trait_ref: rustc_hir::PolyTraitRef<'tcx>,
43             [] qpath: rustc_hir::QPath<'tcx>,
44             [] stmt: rustc_hir::Stmt<'tcx>,
45             [] field_def: rustc_hir::FieldDef<'tcx>,
46             [] trait_item: rustc_hir::TraitItem<'tcx>,
47             [] trait_item_ref: rustc_hir::TraitItemRef,
48             [] ty: rustc_hir::Ty<'tcx>,
49             [] type_binding: rustc_hir::TypeBinding<'tcx>,
50             [] variant: rustc_hir::Variant<'tcx>,
51             [] where_predicate: rustc_hir::WherePredicate<'tcx>,
52         ]);
53     )
54 }