-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Annotate panic! reasons during enum layout #118974
Merged
bors
merged 1 commit into
rust-lang:master
from
workingjubilee:why-worry-about-enum-abi
Dec 15, 2023
Merged
Annotate panic! reasons during enum layout #118974
bors
merged 1 commit into
rust-lang:master
from
workingjubilee:why-worry-about-enum-abi
Dec 15, 2023
+14
−6
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r? @davidtwco (rustbot has picked a reviewer for you, use r? to override) |
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Dec 15, 2023
workingjubilee
force-pushed
the
why-worry-about-enum-abi
branch
from
December 15, 2023 10:21
d88cb44
to
0e9d400
Compare
Add some reasons to the panics, and use more exhaustive matches.
davidtwco
approved these changes
Dec 15, 2023
@bors r+ rollup |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Dec 15, 2023
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 15, 2023
…iaskrgr Rollup of 3 pull requests Successful merges: - rust-lang#118962 (Annotate some bugs) - rust-lang#118969 (coverage: Use `Waker::noop` in async tests) - rust-lang#118974 (Annotate panic! reasons during enum layout) Failed merges: - rust-lang#111658 (Refactor pre-getopts command line argument handling) - rust-lang#117449 (Avoid silencing relevant follow-up errors) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 15, 2023
Rollup merge of rust-lang#118974 - workingjubilee:why-worry-about-enum-abi, r=davidtwco Annotate panic! reasons during enum layout Add some reasons to the panics, and use more exhaustive matches. Also see: rust-lang#118955
For reasons unclear to me, bors thinks this is still a PR, thus: |
bors
added
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Dec 15, 2023
compiler-errors
added a commit
to compiler-errors/rust
that referenced
this pull request
Dec 23, 2023
…-fn, r=b-naber Extract `layout_of_{struct,enum}` fn While writing rust-lang#118974 I noticed it was annoying to navigate a huge, several hundred line function, which handles many subcases, and make confident declarations about what part of the flow of execution the compiler would be in. To help with that, this breaks out `layout_of_struct_or_enum`'s fundamental logic into a pair of functions, one for each case. It changes essentially none of that logic, merely moves it around. Because "the layout of an ADT" feels like a somewhat nebulous subject, I chose to deliberately avoid any expansions to LayoutCalculator's public API, though such does feel like a possible logical next step. There are, indeed, many logical next steps. I'm not taking any of them here, yet, because this comparatively tiny refactor is a prerequisite for all of them.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 23, 2023
Rollup merge of rust-lang#119012 - workingjubilee:extract-enum-layout-fn, r=b-naber Extract `layout_of_{struct,enum}` fn While writing rust-lang#118974 I noticed it was annoying to navigate a huge, several hundred line function, which handles many subcases, and make confident declarations about what part of the flow of execution the compiler would be in. To help with that, this breaks out `layout_of_struct_or_enum`'s fundamental logic into a pair of functions, one for each case. It changes essentially none of that logic, merely moves it around. Because "the layout of an ADT" feels like a somewhat nebulous subject, I chose to deliberately avoid any expansions to LayoutCalculator's public API, though such does feel like a possible logical next step. There are, indeed, many logical next steps. I'm not taking any of them here, yet, because this comparatively tiny refactor is a prerequisite for all of them.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add some reasons to the panics, and use more exhaustive matches.
Also see: #118955