Open
Description
We can probably clean a bunch of things up in library/core/src/panic.rs
, library/core/src/panicking.rs
, library/core/src/panic/panic_info.rs
, library/std/src/panic.rs
and library/std/src/panicking.rs
.
Here's an attempt of a sketch of the situation today:
(Edit: last diagram update: 2023-09-21)
(Note that a bunch of the complexity is the implementations of some of these functions, which is not visible in this diagram.)
- Make
PanicInfo::message
available in all situations MakePanicInfo::message
infallible #115561 - Clear up confusion about 'message' (available in #[panic_handler]) and 'payload' (available in panic hook)
- By splitting PanicInfo into two types? Split core's PanicInfo and std's PanicInfo #115974
- Add payload_as_str method: Tracking Issue for PanicHookInfo::payload_as_str() #125175
- Call panic_display directly in const_panic_fmt. #116007
- Use clearer naming internally
- Rename BoxMeUp to PanicPayload. #116008
- Rename
r#try
tocatch_unwind
: rename 'try' intrinsic to 'catch_unwind' #121598 - Rename
rust_panic_without_hook
toresume_unwind
- Remove unnecessary
rust_
prefixes - Find a better name for
begin_panic
- Rename
begin_panic_handler
to justpanic_handler
- Simplify more things
- Document more things
- ...