Skip to content

Commit 6d14583

Browse files
committed
Auto merge of rust-lang#109507 - Amanieu:panic-oom-payload, r=davidtwco
Report allocation errors as panics OOM is now reported as a panic but with a custom payload type (`AllocErrorPanicPayload`) which holds the layout that was passed to `handle_alloc_error`. This should be review one commit at a time: - The first commit adds `AllocErrorPanicPayload` and changes allocation errors to always be reported as panics. - The second commit removes `#[alloc_error_handler]` and the `alloc_error_hook` API. ACP: rust-lang/libs-team#192 Closes rust-lang#51540 Closes rust-lang#51245
2 parents 6df8082 + 35fc578 commit 6d14583

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Diff for: crates/hir-def/src/builtin_attr.rs

-4
Original file line numberDiff line numberDiff line change
@@ -381,10 +381,6 @@ pub const INERT_ATTRIBUTES: &[BuiltinAttribute] = &[
381381

382382
rustc_attr!(rustc_allocator, Normal, template!(Word), WarnFollowing, IMPL_DETAIL),
383383
rustc_attr!(rustc_nounwind, Normal, template!(Word), WarnFollowing, IMPL_DETAIL),
384-
gated!(
385-
alloc_error_handler, Normal, template!(Word), WarnFollowing,
386-
experimental!(alloc_error_handler)
387-
),
388384
gated!(
389385
default_lib_allocator, Normal, template!(Word), WarnFollowing, allocator_internals,
390386
experimental!(default_lib_allocator),

0 commit comments

Comments
 (0)