- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Open
Labels
A-panicArea: Panicking machineryArea: Panicking machineryC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
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::messageavailable in all situations MakePanicInfo::messageinfallible #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#trytocatch_unwind: rename 'try' intrinsic to 'catch_unwind' #121598
-  Rename rust_panic_without_hooktoresume_unwindRenamerust_panic_without_hooktoresume_unwind#144852
-  Remove unnecessary rust_prefixes Remove unnecessaryrust_prefixes #144853
-  Find a better name for begin_panic
-  Rename begin_panic_handlerto justpanic_handlerRenamebegin_panic_handlertopanic_handler#144903
 
- Simplify more things
- Document more things
- ...
XanewokGrigorenkoPVwesleywiser, Noratrieb, ptrca, terrarier2111, fmease and 8 more
Metadata
Metadata
Labels
A-panicArea: Panicking machineryArea: Panicking machineryC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
