2021-11-16 09:49:15 +11:00
|
|
|
/// This higher-order macro declares a list of types which can be allocated by `Arena`.
|
2019-05-19 17:27:28 +02:00
|
|
|
///
|
2020-05-01 22:28:15 +02:00
|
|
|
/// Specifying the `decode` modifier will add decode impls for `&T` and `&[T]` where `T` is the type
|
2019-05-19 17:27:28 +02:00
|
|
|
/// listed. These impls will appear in the implement_ty_decoder! macro.
|
2019-03-29 17:49:11 +01:00
|
|
|
#[macro_export]
|
|
|
|
macro_rules! arena_types {
|
2021-11-16 09:28:26 +11:00
|
|
|
($macro:path) => (
|
2021-08-30 13:09:38 +02:00
|
|
|
$macro!([
|
2022-03-04 13:46:56 +11:00
|
|
|
[] layout: rustc_target::abi::LayoutS<'tcx>,
|
2021-11-16 09:28:26 +11:00
|
|
|
[] fn_abi: rustc_target::abi::call::FnAbi<'tcx, rustc_middle::ty::Ty<'tcx>>,
|
2020-04-03 09:49:21 +02:00
|
|
|
// AdtDef are interned and compared by address
|
2022-03-05 07:28:41 +11:00
|
|
|
[decode] adt_def: rustc_middle::ty::AdtDefData,
|
2021-11-16 09:28:26 +11:00
|
|
|
[] steal_thir: rustc_data_structures::steal::Steal<rustc_middle::thir::Thir<'tcx>>,
|
|
|
|
[] steal_mir: rustc_data_structures::steal::Steal<rustc_middle::mir::Body<'tcx>>,
|
|
|
|
[decode] mir: rustc_middle::mir::Body<'tcx>,
|
2020-07-03 22:15:27 +02:00
|
|
|
[] steal_promoted:
|
2020-11-14 01:29:30 +01:00
|
|
|
rustc_data_structures::steal::Steal<
|
2020-07-03 22:15:27 +02:00
|
|
|
rustc_index::vec::IndexVec<
|
|
|
|
rustc_middle::mir::Promoted,
|
2021-11-16 09:28:26 +11:00
|
|
|
rustc_middle::mir::Body<'tcx>
|
2020-07-03 22:15:27 +02:00
|
|
|
>
|
|
|
|
>,
|
2020-07-07 00:34:28 +02:00
|
|
|
[decode] promoted:
|
2020-07-06 23:49:53 +02:00
|
|
|
rustc_index::vec::IndexVec<
|
|
|
|
rustc_middle::mir::Promoted,
|
2021-11-16 09:28:26 +11:00
|
|
|
rustc_middle::mir::Body<'tcx>
|
2020-07-06 23:49:53 +02:00
|
|
|
>,
|
2021-11-16 09:28:26 +11:00
|
|
|
[decode] typeck_results: rustc_middle::ty::TypeckResults<'tcx>,
|
2020-07-03 22:15:27 +02:00
|
|
|
[decode] borrowck_result:
|
2021-11-16 09:28:26 +11:00
|
|
|
rustc_middle::mir::BorrowCheckResult<'tcx>,
|
2020-06-15 17:29:14 +01:00
|
|
|
[decode] unsafety_check_result: rustc_middle::mir::UnsafetyCheckResult,
|
2020-11-30 23:58:08 -08:00
|
|
|
[decode] code_region: rustc_middle::mir::coverage::CodeRegion,
|
2020-06-15 17:29:14 +01:00
|
|
|
[] const_allocs: rustc_middle::mir::interpret::Allocation,
|
2022-05-25 13:52:32 +08:00
|
|
|
[] region_scope_tree: rustc_middle::middle::region::ScopeTree,
|
2020-04-03 09:49:21 +02:00
|
|
|
// Required for the incremental on-disk cache
|
2021-11-15 17:15:42 +11:00
|
|
|
[] mir_keys: rustc_hir::def_id::DefIdSet,
|
2018-11-30 23:37:18 +01:00
|
|
|
[] dropck_outlives:
|
2020-03-29 16:41:09 +02:00
|
|
|
rustc_middle::infer::canonical::Canonical<'tcx,
|
|
|
|
rustc_middle::infer::canonical::QueryResponse<'tcx,
|
|
|
|
rustc_middle::traits::query::DropckOutlivesResult<'tcx>
|
2018-11-30 23:37:18 +01:00
|
|
|
>
|
|
|
|
>,
|
|
|
|
[] normalize_projection_ty:
|
2020-03-29 16:41:09 +02:00
|
|
|
rustc_middle::infer::canonical::Canonical<'tcx,
|
|
|
|
rustc_middle::infer::canonical::QueryResponse<'tcx,
|
|
|
|
rustc_middle::traits::query::NormalizationResult<'tcx>
|
2018-11-30 23:37:18 +01:00
|
|
|
>
|
|
|
|
>,
|
|
|
|
[] implied_outlives_bounds:
|
2020-03-29 16:41:09 +02:00
|
|
|
rustc_middle::infer::canonical::Canonical<'tcx,
|
|
|
|
rustc_middle::infer::canonical::QueryResponse<'tcx,
|
|
|
|
Vec<rustc_middle::traits::query::OutlivesBound<'tcx>>
|
2018-11-30 23:37:18 +01:00
|
|
|
>
|
|
|
|
>,
|
2022-03-24 19:21:41 +01:00
|
|
|
[] dtorck_constraint: rustc_middle::traits::query::DropckConstraint<'tcx>,
|
2022-01-31 19:55:34 +01:00
|
|
|
[] candidate_step: rustc_middle::traits::query::CandidateStep<'tcx>,
|
|
|
|
[] autoderef_bad_ty: rustc_middle::traits::query::MethodAutoderefBadTy<'tcx>,
|
2022-07-12 15:21:58 +02:00
|
|
|
[] query_region_constraints: rustc_middle::infer::canonical::QueryRegionConstraints<'tcx>,
|
2018-11-30 23:37:18 +01:00
|
|
|
[] type_op_subtype:
|
2020-03-29 16:41:09 +02:00
|
|
|
rustc_middle::infer::canonical::Canonical<'tcx,
|
|
|
|
rustc_middle::infer::canonical::QueryResponse<'tcx, ()>
|
2018-11-30 23:37:18 +01:00
|
|
|
>,
|
|
|
|
[] type_op_normalize_poly_fn_sig:
|
2020-03-29 16:41:09 +02:00
|
|
|
rustc_middle::infer::canonical::Canonical<'tcx,
|
|
|
|
rustc_middle::infer::canonical::QueryResponse<'tcx, rustc_middle::ty::PolyFnSig<'tcx>>
|
2018-11-30 23:37:18 +01:00
|
|
|
>,
|
|
|
|
[] type_op_normalize_fn_sig:
|
2020-03-29 16:41:09 +02:00
|
|
|
rustc_middle::infer::canonical::Canonical<'tcx,
|
|
|
|
rustc_middle::infer::canonical::QueryResponse<'tcx, rustc_middle::ty::FnSig<'tcx>>
|
2018-11-30 23:37:18 +01:00
|
|
|
>,
|
|
|
|
[] type_op_normalize_predicate:
|
2020-03-29 16:41:09 +02:00
|
|
|
rustc_middle::infer::canonical::Canonical<'tcx,
|
|
|
|
rustc_middle::infer::canonical::QueryResponse<'tcx, rustc_middle::ty::Predicate<'tcx>>
|
2018-11-30 23:37:18 +01:00
|
|
|
>,
|
|
|
|
[] type_op_normalize_ty:
|
2020-03-29 16:41:09 +02:00
|
|
|
rustc_middle::infer::canonical::Canonical<'tcx,
|
|
|
|
rustc_middle::infer::canonical::QueryResponse<'tcx, rustc_middle::ty::Ty<'tcx>>
|
2018-11-30 23:37:18 +01:00
|
|
|
>,
|
2021-11-15 17:15:42 +11:00
|
|
|
[] all_traits: Vec<rustc_hir::def_id::DefId>,
|
|
|
|
[] privacy_access_levels: rustc_middle::middle::privacy::AccessLevels,
|
|
|
|
[] foreign_module: rustc_session::cstore::ForeignModule,
|
|
|
|
[] foreign_modules: Vec<rustc_session::cstore::ForeignModule>,
|
2020-06-15 17:29:14 +01:00
|
|
|
[] upvars_mentioned: rustc_data_structures::fx::FxIndexMap<rustc_hir::HirId, rustc_hir::Upvar>,
|
|
|
|
[] object_safety_violations: rustc_middle::traits::ObjectSafetyViolation,
|
2021-11-16 09:28:26 +11:00
|
|
|
[] codegen_unit: rustc_middle::mir::mono::CodegenUnit<'tcx>,
|
2022-03-28 19:53:01 +02:00
|
|
|
[decode] attribute: rustc_ast::Attribute,
|
2020-06-15 17:29:14 +01:00
|
|
|
[] name_set: rustc_data_structures::fx::FxHashSet<rustc_span::symbol::Symbol>,
|
|
|
|
[] hir_id_set: rustc_hir::HirIdSet,
|
2019-12-01 17:33:31 +01:00
|
|
|
|
2020-01-02 01:26:18 +01:00
|
|
|
// Interned types
|
2022-04-05 16:42:47 +00:00
|
|
|
[] tys: rustc_data_structures::intern::WithStableHash<rustc_middle::ty::TyS<'tcx>>,
|
2022-01-27 17:00:16 +11:00
|
|
|
[] predicates: rustc_middle::ty::PredicateS<'tcx>,
|
2022-02-02 14:24:45 +11:00
|
|
|
[] consts: rustc_middle::ty::ConstS<'tcx>,
|
2020-01-02 01:26:18 +01:00
|
|
|
|
2020-05-20 17:39:19 -04:00
|
|
|
// Note that this deliberately duplicates items in the `rustc_hir::arena`,
|
|
|
|
// since we need to allocate this type on both the `rustc_hir` arena
|
|
|
|
// (during lowering) and the `librustc_middle` arena (for decoding MIR)
|
2020-04-27 23:26:11 +05:30
|
|
|
[decode] asm_template: rustc_ast::InlineAsmTemplatePiece,
|
2020-06-15 17:29:14 +01:00
|
|
|
[decode] used_trait_imports: rustc_data_structures::fx::FxHashSet<rustc_hir::def_id::LocalDefId>,
|
2022-07-05 21:54:38 +02:00
|
|
|
[decode] is_late_bound_map: rustc_data_structures::fx::FxIndexSet<rustc_hir::def_id::LocalDefId>,
|
2022-01-31 19:55:34 +01:00
|
|
|
[decode] impl_source: rustc_middle::traits::ImplSource<'tcx, ()>,
|
2021-10-16 21:12:34 +02:00
|
|
|
|
2022-08-29 10:20:14 -05:00
|
|
|
[] dep_kind: rustc_middle::dep_graph::DepKindStruct<'tcx>,
|
2022-09-02 21:02:59 +00:00
|
|
|
|
|
|
|
[] trait_impl_trait_tys: rustc_data_structures::fx::FxHashMap<rustc_hir::def_id::DefId, rustc_middle::ty::Ty<'tcx>>,
|
2021-11-16 09:28:26 +11:00
|
|
|
]);
|
2019-03-29 17:49:11 +01:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2021-11-16 09:28:26 +11:00
|
|
|
arena_types!(rustc_arena::declare_arena);
|