2022-11-25 16:55:25 +00:00
|
|
|
#![allow(rustc::usage_of_ty_tykind)]
|
|
|
|
|
2021-11-15 22:49:15 +00:00
|
|
|
/// This higher-order macro declares a list of types which can be allocated by `Arena`.
|
2019-05-19 15:27:28 +00:00
|
|
|
///
|
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
|
2019-05-19 15:27:28 +00:00
|
|
|
/// listed. These impls will appear in the implement_ty_decoder! macro.
|
2019-03-29 16:49:11 +00:00
|
|
|
#[macro_export]
|
|
|
|
macro_rules! arena_types {
|
2021-11-15 22:28:26 +00:00
|
|
|
($macro:path) => (
|
2021-08-30 11:09:38 +00:00
|
|
|
$macro!([
|
2023-09-29 16:00:06 +00:00
|
|
|
[] layout: rustc_target::abi::LayoutS<rustc_target::abi::FieldIdx, rustc_target::abi::VariantIdx>,
|
2021-11-15 22:28:26 +00:00
|
|
|
[] fn_abi: rustc_target::abi::call::FnAbi<'tcx, rustc_middle::ty::Ty<'tcx>>,
|
2020-04-03 07:49:21 +00:00
|
|
|
// AdtDef are interned and compared by address
|
2022-03-04 20:28:41 +00:00
|
|
|
[decode] adt_def: rustc_middle::ty::AdtDefData,
|
2021-11-15 22:28:26 +00: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 20:15:27 +00:00
|
|
|
[] steal_promoted:
|
2020-11-14 00:29:30 +00:00
|
|
|
rustc_data_structures::steal::Steal<
|
2023-04-19 10:57:17 +00:00
|
|
|
rustc_index::IndexVec<
|
2020-07-03 20:15:27 +00:00
|
|
|
rustc_middle::mir::Promoted,
|
2021-11-15 22:28:26 +00:00
|
|
|
rustc_middle::mir::Body<'tcx>
|
2020-07-03 20:15:27 +00:00
|
|
|
>
|
|
|
|
>,
|
2020-07-06 22:34:28 +00:00
|
|
|
[decode] promoted:
|
2023-04-19 10:57:17 +00:00
|
|
|
rustc_index::IndexVec<
|
2020-07-06 21:49:53 +00:00
|
|
|
rustc_middle::mir::Promoted,
|
2021-11-15 22:28:26 +00:00
|
|
|
rustc_middle::mir::Body<'tcx>
|
2020-07-06 21:49:53 +00:00
|
|
|
>,
|
2021-11-15 22:28:26 +00:00
|
|
|
[decode] typeck_results: rustc_middle::ty::TypeckResults<'tcx>,
|
2023-11-20 03:35:34 +00:00
|
|
|
[decode] borrowck_result: rustc_middle::mir::BorrowCheckResult<'tcx>,
|
2022-12-05 16:43:06 +00:00
|
|
|
[] resolver: rustc_data_structures::steal::Steal<(
|
|
|
|
rustc_middle::ty::ResolverAstLowering,
|
|
|
|
rustc_data_structures::sync::Lrc<rustc_ast::Crate>,
|
|
|
|
)>,
|
2023-03-14 12:53:04 +00:00
|
|
|
[] crate_for_resolver: rustc_data_structures::steal::Steal<(rustc_ast::Crate, rustc_ast::AttrVec)>,
|
2022-12-05 16:19:14 +00:00
|
|
|
[] resolutions: rustc_middle::ty::ResolverGlobalCtxt,
|
2020-06-15 16:29:14 +00:00
|
|
|
[decode] unsafety_check_result: rustc_middle::mir::UnsafetyCheckResult,
|
2020-12-01 07:58:08 +00:00
|
|
|
[decode] code_region: rustc_middle::mir::coverage::CodeRegion,
|
2020-06-15 16:29:14 +00:00
|
|
|
[] const_allocs: rustc_middle::mir::interpret::Allocation,
|
2022-05-25 05:52:32 +00:00
|
|
|
[] region_scope_tree: rustc_middle::middle::region::ScopeTree,
|
2020-04-03 07:49:21 +00:00
|
|
|
// Required for the incremental on-disk cache
|
2021-11-15 06:15:42 +00:00
|
|
|
[] mir_keys: rustc_hir::def_id::DefIdSet,
|
2018-11-30 22:37:18 +00:00
|
|
|
[] dropck_outlives:
|
2020-03-29 14:41:09 +00:00
|
|
|
rustc_middle::infer::canonical::Canonical<'tcx,
|
|
|
|
rustc_middle::infer::canonical::QueryResponse<'tcx,
|
|
|
|
rustc_middle::traits::query::DropckOutlivesResult<'tcx>
|
2018-11-30 22:37:18 +00:00
|
|
|
>
|
|
|
|
>,
|
2024-02-20 09:34:51 +00:00
|
|
|
[] normalize_canonicalized_projection_ty:
|
2020-03-29 14:41:09 +00:00
|
|
|
rustc_middle::infer::canonical::Canonical<'tcx,
|
|
|
|
rustc_middle::infer::canonical::QueryResponse<'tcx,
|
|
|
|
rustc_middle::traits::query::NormalizationResult<'tcx>
|
2018-11-30 22:37:18 +00:00
|
|
|
>
|
|
|
|
>,
|
|
|
|
[] implied_outlives_bounds:
|
2020-03-29 14:41:09 +00:00
|
|
|
rustc_middle::infer::canonical::Canonical<'tcx,
|
|
|
|
rustc_middle::infer::canonical::QueryResponse<'tcx,
|
|
|
|
Vec<rustc_middle::traits::query::OutlivesBound<'tcx>>
|
2018-11-30 22:37:18 +00:00
|
|
|
>
|
|
|
|
>,
|
2022-03-24 18:21:41 +00:00
|
|
|
[] dtorck_constraint: rustc_middle::traits::query::DropckConstraint<'tcx>,
|
2022-01-31 18:55:34 +00:00
|
|
|
[] candidate_step: rustc_middle::traits::query::CandidateStep<'tcx>,
|
|
|
|
[] autoderef_bad_ty: rustc_middle::traits::query::MethodAutoderefBadTy<'tcx>,
|
2023-10-30 13:23:35 +00:00
|
|
|
[] canonical_goal_evaluation: rustc_middle::traits::solve::inspect::GoalEvaluationStep<'tcx>,
|
2022-07-12 13:21:58 +00:00
|
|
|
[] query_region_constraints: rustc_middle::infer::canonical::QueryRegionConstraints<'tcx>,
|
2018-11-30 22:37:18 +00:00
|
|
|
[] type_op_subtype:
|
2020-03-29 14:41:09 +00:00
|
|
|
rustc_middle::infer::canonical::Canonical<'tcx,
|
|
|
|
rustc_middle::infer::canonical::QueryResponse<'tcx, ()>
|
2018-11-30 22:37:18 +00:00
|
|
|
>,
|
|
|
|
[] type_op_normalize_poly_fn_sig:
|
2020-03-29 14:41:09 +00:00
|
|
|
rustc_middle::infer::canonical::Canonical<'tcx,
|
|
|
|
rustc_middle::infer::canonical::QueryResponse<'tcx, rustc_middle::ty::PolyFnSig<'tcx>>
|
2018-11-30 22:37:18 +00:00
|
|
|
>,
|
|
|
|
[] type_op_normalize_fn_sig:
|
2020-03-29 14:41:09 +00:00
|
|
|
rustc_middle::infer::canonical::Canonical<'tcx,
|
|
|
|
rustc_middle::infer::canonical::QueryResponse<'tcx, rustc_middle::ty::FnSig<'tcx>>
|
2018-11-30 22:37:18 +00:00
|
|
|
>,
|
2023-06-22 18:17:13 +00:00
|
|
|
[] type_op_normalize_clause:
|
2020-03-29 14:41:09 +00:00
|
|
|
rustc_middle::infer::canonical::Canonical<'tcx,
|
2023-06-22 18:17:13 +00:00
|
|
|
rustc_middle::infer::canonical::QueryResponse<'tcx, rustc_middle::ty::Clause<'tcx>>
|
2018-11-30 22:37:18 +00:00
|
|
|
>,
|
|
|
|
[] type_op_normalize_ty:
|
2020-03-29 14:41:09 +00:00
|
|
|
rustc_middle::infer::canonical::Canonical<'tcx,
|
|
|
|
rustc_middle::infer::canonical::QueryResponse<'tcx, rustc_middle::ty::Ty<'tcx>>
|
2018-11-30 22:37:18 +00:00
|
|
|
>,
|
2022-09-22 13:19:53 +00:00
|
|
|
[] effective_visibilities: rustc_middle::middle::privacy::EffectiveVisibilities,
|
2020-06-15 16:29:14 +00:00
|
|
|
[] upvars_mentioned: rustc_data_structures::fx::FxIndexMap<rustc_hir::HirId, rustc_hir::Upvar>,
|
|
|
|
[] object_safety_violations: rustc_middle::traits::ObjectSafetyViolation,
|
2021-11-15 22:28:26 +00:00
|
|
|
[] codegen_unit: rustc_middle::mir::mono::CodegenUnit<'tcx>,
|
2022-03-28 17:53:01 +00:00
|
|
|
[decode] attribute: rustc_ast::Attribute,
|
2023-02-21 14:15:16 +00:00
|
|
|
[] name_set: rustc_data_structures::unord::UnordSet<rustc_span::symbol::Symbol>,
|
|
|
|
[] ordered_name_set: rustc_data_structures::fx::FxIndexSet<rustc_span::symbol::Symbol>,
|
2019-12-01 16:33:31 +00:00
|
|
|
|
2020-05-20 21:39:19 +00: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
|
2024-01-05 02:52:37 +00:00
|
|
|
// (during lowering) and the `rustc_middle` arena (for decoding MIR)
|
2020-04-27 17:56:11 +00:00
|
|
|
[decode] asm_template: rustc_ast::InlineAsmTemplatePiece,
|
2022-10-27 13:23:26 +00:00
|
|
|
[decode] used_trait_imports: rustc_data_structures::unord::UnordSet<rustc_hir::def_id::LocalDefId>,
|
2022-11-05 15:33:58 +00:00
|
|
|
[decode] is_late_bound_map: rustc_data_structures::fx::FxIndexSet<rustc_hir::ItemLocalId>,
|
2022-01-31 18:55:34 +00:00
|
|
|
[decode] impl_source: rustc_middle::traits::ImplSource<'tcx, ()>,
|
2021-10-16 19:12:34 +00:00
|
|
|
|
2022-08-29 15:20:14 +00:00
|
|
|
[] dep_kind: rustc_middle::dep_graph::DepKindStruct<'tcx>,
|
2022-09-02 21:02:59 +00:00
|
|
|
|
2023-04-17 17:46:01 +00:00
|
|
|
[decode] trait_impl_trait_tys:
|
2023-12-21 13:21:01 +00:00
|
|
|
rustc_data_structures::unord::UnordMap<
|
2023-04-17 17:46:01 +00:00
|
|
|
rustc_hir::def_id::DefId,
|
|
|
|
rustc_middle::ty::EarlyBinder<rustc_middle::ty::Ty<'tcx>>
|
|
|
|
>,
|
2023-02-03 02:29:52 +00:00
|
|
|
[] external_constraints: rustc_middle::traits::solve::ExternalConstraintsData<'tcx>,
|
2023-05-16 23:51:23 +00:00
|
|
|
[] predefined_opaques_in_body: rustc_middle::traits::solve::PredefinedOpaquesData<'tcx>,
|
2022-02-01 12:30:32 +00:00
|
|
|
[decode] doc_link_resolutions: rustc_hir::def::DocLinkResMap,
|
2023-03-10 21:39:14 +00:00
|
|
|
[] stripped_cfg_items: rustc_ast::expand::StrippedCfgItem,
|
2023-03-22 13:57:39 +00:00
|
|
|
[] mod_child: rustc_middle::metadata::ModChild,
|
2023-08-09 12:28:00 +00:00
|
|
|
[] features: rustc_feature::Features,
|
2024-01-11 10:05:12 +00:00
|
|
|
[decode] specialization_graph: rustc_middle::traits::specialization_graph::Graph,
|
2024-01-12 14:29:54 +00:00
|
|
|
[] crate_inherent_impls: rustc_middle::ty::CrateInherentImpls,
|
2021-11-15 22:28:26 +00:00
|
|
|
]);
|
2019-03-29 16:49:11 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2021-11-15 22:28:26 +00:00
|
|
|
arena_types!(rustc_arena::declare_arena);
|