1
Fork 0

Revert "Remove #[alloc_error_handler] from the compiler and library"

This reverts commit abc0660118.
This commit is contained in:
Matthias Krüger 2023-04-25 00:08:35 +02:00
parent 33253fa6a4
commit f54dbe6e31
49 changed files with 842 additions and 22 deletions

View file

@ -1351,6 +1351,13 @@ rustc_queries! {
desc { "checking if the crate has_global_allocator" }
separate_provide_extern
}
query has_alloc_error_handler(_: CrateNum) -> bool {
// This query depends on untracked global state in CStore
eval_always
fatal_cycle
desc { "checking if the crate has_alloc_error_handler" }
separate_provide_extern
}
query has_panic_handler(_: CrateNum) -> bool {
fatal_cycle
desc { "checking if the crate has_panic_handler" }
@ -1723,6 +1730,10 @@ rustc_queries! {
eval_always
desc { "getting the allocator kind for the current crate" }
}
query alloc_error_handler_kind(_: ()) -> Option<AllocatorKind> {
eval_always
desc { "alloc error handler kind for the current crate" }
}
query upvars_mentioned(def_id: DefId) -> Option<&'tcx FxIndexMap<hir::HirId, hir::Upvar>> {
desc { |tcx| "collecting upvars mentioned in `{}`", tcx.def_path_str(def_id) }