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.)
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.rsandlibrary/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.)
PanicInfo::messageavailable in all situations MakePanicInfo::messageinfallible #115561r#trytocatch_unwind: rename 'try' intrinsic to 'catch_unwind' #121598rust_panic_without_hooktoresume_unwindRenamerust_panic_without_hooktoresume_unwind#144852rust_prefixes Remove unnecessaryrust_prefixes #144853begin_panicbegin_panic_handlerto justpanic_handlerRenamebegin_panic_handlertopanic_handler#144903