rust/compiler/rustc_hir/src/arena.rs

53 lines
2.5 KiB
Rust
Raw Normal View History

2020-03-21 01:21:21 +00:00
/// This declares a list of types which can be allocated by `Arena`.
///
2020-05-01 20:28:15 +00:00
/// Specifying the `decode` modifier will add decode impls for `&T` and `&[T]`,
/// where `T` is the type listed. These impls will appear in the implement_ty_decoder! macro.
2020-03-21 01:21:21 +00:00
#[macro_export]
macro_rules! arena_types {
2021-08-30 11:09:38 +00:00
($macro:path, $tcx:lifetime) => (
$macro!([
2020-03-21 01:21:21 +00:00
// HIR types
[] hir_krate: rustc_hir::Crate<$tcx>,
2020-06-15 16:29:14 +00:00
[] arm: rustc_hir::Arm<$tcx>,
[] asm_operand: (rustc_hir::InlineAsmOperand<$tcx>, Span),
2020-04-27 17:56:11 +00:00
[] asm_template: rustc_ast::InlineAsmTemplatePiece,
[] attribute: rustc_ast::Attribute,
2020-06-15 16:29:14 +00:00
[] block: rustc_hir::Block<$tcx>,
[] bare_fn_ty: rustc_hir::BareFnTy<$tcx>,
2021-09-17 17:41:05 +00:00
[] body: rustc_hir::Body<$tcx>,
2020-06-15 16:29:14 +00:00
[] generic_arg: rustc_hir::GenericArg<$tcx>,
[] generic_args: rustc_hir::GenericArgs<$tcx>,
[] generic_bound: rustc_hir::GenericBound<$tcx>,
[] generic_param: rustc_hir::GenericParam<$tcx>,
[] expr: rustc_hir::Expr<$tcx>,
[] expr_field: rustc_hir::ExprField<$tcx>,
[] pat_field: rustc_hir::PatField<$tcx>,
2020-06-15 16:29:14 +00:00
[] fn_decl: rustc_hir::FnDecl<$tcx>,
[] foreign_item: rustc_hir::ForeignItem<$tcx>,
[] foreign_item_ref: rustc_hir::ForeignItemRef,
2021-02-05 14:47:44 +00:00
[] impl_item: rustc_hir::ImplItem<$tcx>,
2021-07-15 20:19:39 +00:00
[] impl_item_ref: rustc_hir::ImplItemRef,
2021-02-05 14:47:44 +00:00
[] item: rustc_hir::Item<$tcx>,
[] inline_asm: rustc_hir::InlineAsm<$tcx>,
[] llvm_inline_asm: rustc_hir::LlvmInlineAsm<$tcx>,
2020-06-15 16:29:14 +00:00
[] local: rustc_hir::Local<$tcx>,
[] mod_: rustc_hir::Mod<$tcx>,
[] owner_info: rustc_hir::OwnerInfo<$tcx>,
2020-06-15 16:29:14 +00:00
[] param: rustc_hir::Param<$tcx>,
[] pat: rustc_hir::Pat<$tcx>,
[] path: rustc_hir::Path<$tcx>,
[] path_segment: rustc_hir::PathSegment<$tcx>,
[] poly_trait_ref: rustc_hir::PolyTraitRef<$tcx>,
[] qpath: rustc_hir::QPath<$tcx>,
[] stmt: rustc_hir::Stmt<$tcx>,
[] field_def: rustc_hir::FieldDef<$tcx>,
2021-02-05 14:47:44 +00:00
[] trait_item: rustc_hir::TraitItem<$tcx>,
2020-06-15 16:29:14 +00:00
[] trait_item_ref: rustc_hir::TraitItemRef,
[] ty: rustc_hir::Ty<$tcx>,
[] type_binding: rustc_hir::TypeBinding<$tcx>,
[] variant: rustc_hir::Variant<$tcx>,
[] where_predicate: rustc_hir::WherePredicate<$tcx>,
2020-03-21 01:21:21 +00:00
], $tcx);
)
}