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

Change collect_and_partition_mono_items tuple return type to a struct #136118

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jan 27, 2025

#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.

@rustbot

This comment was marked as outdated.

@rustbot 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 Jan 27, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jan 27, 2025

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred in coverage instrumentation.

cc @Zalathar

@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 27, 2025

r? compiler

@rustbot rustbot assigned Nadrieril and unassigned petrochenkov Jan 27, 2025
@@ -247,6 +247,12 @@ impl ToStableHashKey<StableHashingContext<'_>> for MonoItem<'_> {
}
}

#[derive(Debug, HashStable, Copy, Clone)]
pub struct CodegenUnits<'tcx> {
Copy link
Contributor

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

Copy link
Contributor Author

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?

@Zalathar
Copy link
Contributor

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.

@oli-obk oli-obk force-pushed the push-qsslxsopnrmr branch 2 times, most recently from 6dfd0e2 to 479268b Compare January 27, 2025 09:05
@oli-obk oli-obk assigned Zalathar and unassigned Nadrieril Jan 27, 2025
@Zalathar
Copy link
Contributor

Cool, thanks. Feel free to r=me.

@rust-log-analyzer

This comment has been minimized.

@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 27, 2025

@bors r=Zalathar

@bors
Copy link
Contributor

bors commented Jan 27, 2025

📌 Commit b24f674 has been approved by Zalathar

It is now in the queue for this repository.

@bors 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 Jan 27, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 27, 2025
…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
@bors bors merged commit 3d02ce7 into rust-lang:master Jan 27, 2025
6 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 27, 2025
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.
@rustbot rustbot added this to the 1.86.0 milestone Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants