-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Rename collect_active_jobs to several distinct names
#151976
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
Conversation
|
This comment has been minimized.
This comment has been minimized.
9fe0dee to
177809b
Compare
collect_active_jobs)collect_active_jobs to several distinct names
|
I decided to remove some of the other renames from this PR, and focus primarily on |
| /// Internal per-query plumbing for collecting the set of active jobs for this query. | ||
| /// | ||
| /// Should only be called through `PER_QUERY_GATHER_ACTIVE_JOBS_FNS`. | ||
| pub(crate) fn gather_active_jobs_outer<'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.
| pub(crate) fn gather_active_jobs_outer<'tcx>( | |
| pub(crate) fn gather_active_jobs<'tcx>( |
"Outer" seems like a bit of an overkill, given that gather_active_jobs_inner and this function already have different names.
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.
Sure, removing the _outer seems fine.
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.
For me it was a close call between gather_active_jobs and gather_active_jobs_outer.
I slightly prefer _outer because the two parts are so distant, but I'm happy with both, so I'll go with reviewer preference and change it to gather_active_jobs.
|
This is great! I have been annoyed by these names myself, thanks for fixing them. r=me with the |
177809b to
dea5507
Compare
This comment has been minimized.
This comment has been minimized.
dea5507 to
f95f05f
Compare
|
📋 This PR cannot be approved because it currently has the following label: |
|
Oh yes, even the reduced version of this PR will still need a rebase for #151978. |
This comment has been minimized.
This comment has been minimized.
f95f05f to
a0a5c41
Compare
This comment has been minimized.
This comment has been minimized.
|
Rebased, but this will also need another rebase over #151975, which is currently in rollup. |
This comment has been minimized.
This comment has been minimized.
a0a5c41 to
e58538c
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@rustbot ready |
|
@bors r=nnethercote |
…ethercote Rename `collect_active_jobs` to several distinct names Key renames: - Function `collect_active_jobs` → `collect_active_jobs_from_all_queries` (method in trait `QueryContext`) - Constant `COLLECT_ACTIVE_JOBS` → `PER_QUERY_GATHER_ACTIVE_JOBS_FNS` (list of per-query function pointers) - Function `collect_active_jobs` → `gather_active_jobs` (per-query function in `query_impl::$name`) - Function `collect_active_jobs` → `gather_active_jobs_inner` (method in `QueryState`) - Giving these four things distinct names makes it a lot easier to tell them apart! - The switch from “collect” (all queries) to “gather” (single query) is intended to make the different parts a bit more memorable and searchable; I couldn't think of a more natural way to express this distinction so I settled for two different synonyms. There should be no change to compiler behaviour. r? nnethercote (or compiler)
Rollup of 6 pull requests Successful merges: - #152008 (`rust-analyzer` subtree update) - #151109 (fN::BITS constants for feature float_bits_const) - #151976 (Rename `collect_active_jobs` to several distinct names) - #151691 (compiletest: Don't assume `aux-crate` becomes a `*.so` with `no-prefer-dynamic`) - #151919 (fix: Make `--color always` always print color with `--explain`) - #152028 (Convert to inline diagnostics in `rustc_driver_impl`)
Rollup of 7 pull requests Successful merges: - #152008 (`rust-analyzer` subtree update) - #151109 (fN::BITS constants for feature float_bits_const) - #151976 (Rename `collect_active_jobs` to several distinct names) - #151691 (compiletest: Don't assume `aux-crate` becomes a `*.so` with `no-prefer-dynamic`) - #151919 (fix: Make `--color always` always print color with `--explain`) - #152017 (Remove `with_no_trimmed_paths` use in query macro) - #152028 (Convert to inline diagnostics in `rustc_driver_impl`)
Rollup merge of #151976 - Zalathar:collect-active-jobs, r=nnethercote Rename `collect_active_jobs` to several distinct names Key renames: - Function `collect_active_jobs` → `collect_active_jobs_from_all_queries` (method in trait `QueryContext`) - Constant `COLLECT_ACTIVE_JOBS` → `PER_QUERY_GATHER_ACTIVE_JOBS_FNS` (list of per-query function pointers) - Function `collect_active_jobs` → `gather_active_jobs` (per-query function in `query_impl::$name`) - Function `collect_active_jobs` → `gather_active_jobs_inner` (method in `QueryState`) - Giving these four things distinct names makes it a lot easier to tell them apart! - The switch from “collect” (all queries) to “gather” (single query) is intended to make the different parts a bit more memorable and searchable; I couldn't think of a more natural way to express this distinction so I settled for two different synonyms. There should be no change to compiler behaviour. r? nnethercote (or compiler)
Rollup of 7 pull requests Successful merges: - rust-lang/rust#152008 (`rust-analyzer` subtree update) - rust-lang/rust#151109 (fN::BITS constants for feature float_bits_const) - rust-lang/rust#151976 (Rename `collect_active_jobs` to several distinct names) - rust-lang/rust#151691 (compiletest: Don't assume `aux-crate` becomes a `*.so` with `no-prefer-dynamic`) - rust-lang/rust#151919 (fix: Make `--color always` always print color with `--explain`) - rust-lang/rust#152017 (Remove `with_no_trimmed_paths` use in query macro) - rust-lang/rust#152028 (Convert to inline diagnostics in `rustc_driver_impl`)
Rollup of 7 pull requests Successful merges: - rust-lang/rust#152008 (`rust-analyzer` subtree update) - rust-lang/rust#151109 (fN::BITS constants for feature float_bits_const) - rust-lang/rust#151976 (Rename `collect_active_jobs` to several distinct names) - rust-lang/rust#151691 (compiletest: Don't assume `aux-crate` becomes a `*.so` with `no-prefer-dynamic`) - rust-lang/rust#151919 (fix: Make `--color always` always print color with `--explain`) - rust-lang/rust#152017 (Remove `with_no_trimmed_paths` use in query macro) - rust-lang/rust#152028 (Convert to inline diagnostics in `rustc_driver_impl`)
Rollup of 7 pull requests Successful merges: - rust-lang/rust#152008 (`rust-analyzer` subtree update) - rust-lang/rust#151109 (fN::BITS constants for feature float_bits_const) - rust-lang/rust#151976 (Rename `collect_active_jobs` to several distinct names) - rust-lang/rust#151691 (compiletest: Don't assume `aux-crate` becomes a `*.so` with `no-prefer-dynamic`) - rust-lang/rust#151919 (fix: Make `--color always` always print color with `--explain`) - rust-lang/rust#152017 (Remove `with_no_trimmed_paths` use in query macro) - rust-lang/rust#152028 (Convert to inline diagnostics in `rustc_driver_impl`)
Key renames:
collect_active_jobs→collect_active_jobs_from_all_queries(method in traitQueryContext)COLLECT_ACTIVE_JOBS→PER_QUERY_GATHER_ACTIVE_JOBS_FNS(list of per-query function pointers)collect_active_jobs→gather_active_jobs(per-query function inquery_impl::$name)collect_active_jobs→gather_active_jobs_inner(method inQueryState)There should be no change to compiler behaviour.
r? nnethercote (or compiler)