-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking issue for cleaning up core's and std's panic machinery #116005
Comments
m-ou-se
added
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
A-panic
Area: Panicking machinery
labels
Sep 20, 2023
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Sep 20, 2023
m-ou-se
removed
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Sep 20, 2023
This was referenced Sep 20, 2023
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Sep 20, 2023
Rename BoxMeUp to PanicPayload. "BoxMeUp" is not very clear. Let's rename that to a description of what it actually represents: a panic payload. This PR also renames the structs that implement this trait to have more descriptive names. Part of rust-lang#116005 r? `@oli-obk`
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Sep 21, 2023
Rollup merge of rust-lang#116008 - m-ou-se:boxmeup, r=oli-obk Rename BoxMeUp to PanicPayload. "BoxMeUp" is not very clear. Let's rename that to a description of what it actually represents: a panic payload. This PR also renames the structs that implement this trait to have more descriptive names. Part of rust-lang#116005 r? `@oli-obk`
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Sep 21, 2023
…lay, r=oli-obk Call panic_display directly in const_panic_fmt. `panic_str` just directly calls `panic_display`. The only reason `panic_str` exists, is for a lint to detect an expansion of `panic_2015!(expr)` (which expands to `panic_str`). It is `panic_display` that is hooked by const-eval, which is the reason we call it here. Part of rust-lang#116005 r? `@oli-obk`
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Sep 21, 2023
…lay, r=oli-obk Call panic_display directly in const_panic_fmt. `panic_str` just directly calls `panic_display`. The only reason `panic_str` exists, is for a lint to detect an expansion of `panic_2015!(expr)` (which expands to `panic_str`). It is `panic_display` that is hooked by const-eval, which is the reason we call it here. Part of rust-lang#116005 r? ``@oli-obk``
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Sep 21, 2023
Rollup merge of rust-lang#116007 - m-ou-se:const-panic-fmt-panic-display, r=oli-obk Call panic_display directly in const_panic_fmt. `panic_str` just directly calls `panic_display`. The only reason `panic_str` exists, is for a lint to detect an expansion of `panic_2015!(expr)` (which expands to `panic_str`). It is `panic_display` that is hooked by const-eval, which is the reason we call it here. Part of rust-lang#116005 r? ``@oli-obk``
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
andlibrary/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::message
available in all situations MakePanicInfo::message
infallible #115561r#try
tocatch_unwind
: rename 'try' intrinsic to 'catch_unwind' #121598rust_panic_without_hook
toresume_unwind
rust_
prefixesbegin_panic
begin_panic_handler
to justpanic_handler
The text was updated successfully, but these errors were encountered: