Unbox and unwrap the contents of `StatementKind::Coverage` by Zalathar · Pull Re...
source link: https://github.com/rust-lang/rust/pull/122937
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Unbox and unwrap the contents of StatementKind::Coverage
#122937
Merged
Conversation
Contributor
The payload of coverage statements was historically a structure with several fields, so it was boxed to avoid bloating StatementKind
.
Now that the payload is a single relatively-small enum, we can replace Box<Coverage>
with just CoverageKind
.
This patch also adds a size assertion for StatementKind
, to avoid accidentally bloating it in the future.
@rustbot label +A-code-coverage
Collaborator
rustbot has assigned @matthewjasper. Use |
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
Collaborator
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt This PR changes MIR cc @oli-obk, @RalfJung, @JakobDegen, @davidtwco, @celinval, @vakaras Some changes occurred in compiler/rustc_codegen_gcc |
added the A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) label
Contributor
Author
Changes to (Maybe I should give |
Comment on lines
-190 to -192
// Ignore `ConstEvalCounter`s |
||
| StatementKind::ConstEvalCounter |
||
// Ignore `Nop`s |
Contributor
Author
I noticed that these comments were preventing rustfmt
from formatting this match, presumably due to rust-lang/rustfmt#4119.
Since these particular comments are low-value anyway, I worked around the issue by just deleting them.
Contributor
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Successfully merging this pull request may close these issues.
None yet
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK