Skip to content
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

Open
7 of 15 tasks
m-ou-se opened this issue Sep 20, 2023 · 0 comments
Open
7 of 15 tasks

Tracking issue for cleaning up core's and std's panic machinery #116005

m-ou-se opened this issue Sep 20, 2023 · 0 comments
Assignees
Labels
A-panic Area: Panicking machinery 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.

Comments

@m-ou-se
Copy link
Member

m-ou-se commented Sep 20, 2023

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:

diagram

(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.)

@m-ou-se 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
@m-ou-se m-ou-se self-assigned this Sep 20, 2023
@rustbot 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 m-ou-se removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label 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
Labels
A-panic Area: Panicking machinery 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.
Projects
None yet
Development

No branches or pull requests

3 participants