-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Change collect_and_partition_mono_items
tuple return type to a struct
#136118
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
r? compiler |
@@ -247,6 +247,12 @@ impl ToStableHashKey<StableHashingContext<'_>> for MonoItem<'_> { | |||
} | |||
} | |||
|
|||
#[derive(Debug, HashStable, Copy, Clone)] | |||
pub struct CodegenUnits<'tcx> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: Calling this CodegenUnits
seems slightly weird, since it contains both codegen_units
and associated global info that is not codegen units.
(For a struct that exists to be returned by a single query, my first thought would have been to name it something boring derived from the name of the query.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea... I couldn't come up with anything so I used that. MonoItemPartitions
maybe?
I have reservations about the struct name, but otherwise I'm very happy to see this change. I remember being annoyed that it hadn't been done already. |
6dfd0e2
to
479268b
Compare
Cool, thanks. Feel free to r=me. |
This comment has been minimized.
This comment has been minimized.
479268b
to
b24f674
Compare
@bors r=Zalathar |
…llaumeGomez Rollup of 10 pull requests Successful merges: - rust-lang#135773 (Clarify WindowsMut (Lending)Iterator) - rust-lang#135807 (Implement phantom variance markers) - rust-lang#135876 (fix doc for std::sync::mpmc) - rust-lang#135988 (Add a workaround for parallel rustc crashing when there are delayed bugs) - rust-lang#136037 (Mark all NuttX targets as tier 3 target and support the standard library) - rust-lang#136064 (Add a suggestion to cast target_feature fn items to fn pointers.) - rust-lang#136082 (Incorporate `iter_nodes` into `graph::DirectedGraph`) - rust-lang#136112 (Clean up all dead files inside `tests/ui/`) - rust-lang#136114 (Use identifiers more in diagnostics code) - rust-lang#136118 (Change `collect_and_partition_mono_items` tuple return type to a struct) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#136118 - oli-obk:push-qsslxsopnrmr, r=Zalathar Change `collect_and_partition_mono_items` tuple return type to a struct rust-lang#133429 will add a new field to this tuple, so it seems prudent to turn it into a struct first to avoid confusion about what the tuple elements mean.
#133429 will add a new field to this tuple, so it seems prudent to turn it into a struct first to avoid confusion about what the tuple elements mean.