Skip to content

Move operations out of rustc_middle::query::job - #162876

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
nnethercote:mv-ops-out-of-rustc_middle-query-job
Sep 17, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
nnethercote:mv-ops-out-of-rustc_middle-query-job

Conversation

@nnethercote

Copy link
Copy Markdown
Contributor

Generally rustc_middle::query has types while rustc_query_impl has operations. So this commit moves some operations from the former to the latter. Some of them are just moved, while others are inlined and removed.

r? @Zalathar

Generally `rustc_middle::query` has types while `rustc_query_impl` has
operations. So this commit moves some operations from the former to the
latter. Some of them are just moved, while others are inlined and
removed.
@rustbot

rustbot commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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 Sep 17, 2026
@rustbot

rustbot commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Zalathar is not on the review rotation at the moment.
They may take a while to respond.

@Zalathar

Copy link
Copy Markdown
Member

Makes sense. It's a shame that the language doesn't have great affordances for cases like this, where you need to declare a type upstream for storage purposes, but then define and use its methods downstream.

I could make a case for trying to group the operations together in some logical way, rather than having them spread out near their call-sites, but that would quickly spiral into scope-creep and bikeshedding so I don't think it's essential for this PR.

@bors r+

@rust-bors

rust-bors Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 79d24a0 has been approved by Zalathar

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Sep 17, 2026
Zalathar added a commit to Zalathar/rust that referenced this pull request Sep 17, 2026
…ddle-query-job, r=Zalathar

Move operations out of `rustc_middle::query::job`

Generally `rustc_middle::query` has types while `rustc_query_impl` has operations. So this commit moves some operations from the former to the latter. Some of them are just moved, while others are inlined and removed.

r? @Zalathar
rust-bors Bot pushed a commit that referenced this pull request Sep 17, 2026
Rollup of 16 pull requests

Successful merges:

 - #161596 (coretests: Add more pattern tests.)
 - #162796 (libtest: do not early exit from test runners)
 - #162844 (Add loan reachability traces to polonius MIR dumps)
 - #162876 (Move operations out of `rustc_middle::query::job`)
 - #160108 (Stabilize `windows_process_extensions_main_thread_handle`)
 - #160212 (traits: Fix rigid alias liveness matching)
 - #160544 (Stabilize `feature(trim_prefix_suffix)` (`{str, [T], Path}::trim_prefix` and `{str, [T]}::trim_suffix`))
 - #161246 (Normalize non-rigid aliases in ty_known_to_outlive)
 - #161305 (Use the entire type of a dropped local to compute variance (edge direction) for Polonius alpha)
 - #161838 (tests: accept LLVM 24 optimization in this test)
 - #162805 (Add `must_use` lint to `ExitCode`)
 - #162825 (core: Add examples for `debug_closure_helpers`)
 - #162841 (enable asm tests for xtensa targets)
 - #162842 (reintroduce check RibKind::ConstParamTy did in direct consts)
 - #162845 (mgca: fix issue with mismatched array valtree/valtree tys)
 - #162856 (Stabilize CommandExt::show_window)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 17, 2026
…ddle-query-job, r=Zalathar

Move operations out of `rustc_middle::query::job`

Generally `rustc_middle::query` has types while `rustc_query_impl` has operations. So this commit moves some operations from the former to the latter. Some of them are just moved, while others are inlined and removed.

r? @Zalathar
rust-bors Bot pushed a commit that referenced this pull request Sep 17, 2026
…uwer

Rollup of 24 pull requests

Successful merges:

 - #161596 (coretests: Add more pattern tests.)
 - #162177 (Properly implement the gpu-kernel ABI for amdgpu)
 - #162411 (Make Receiver `#[rustc_dyn_incompatible_trait]`)
 - #162760 (yeet alias new_from_def_id)
 - #162796 (libtest: do not early exit from test runners)
 - #162844 (Add loan reachability traces to polonius MIR dumps)
 - #162876 (Move operations out of `rustc_middle::query::job`)
 - #160108 (Stabilize `windows_process_extensions_main_thread_handle`)
 - #160212 (traits: Fix rigid alias liveness matching)
 - #160544 (Stabilize `feature(trim_prefix_suffix)` (`{str, [T], Path}::trim_prefix` and `{str, [T]}::trim_suffix`))
 - #161305 (Use the entire type of a dropped local to compute variance (edge direction) for Polonius alpha)
 - #161838 (tests: accept LLVM 24 optimization in this test)
 - #162312 (core: Rewrite docs for try_as_dyn)
 - #162785 (Avoid creating overlapping assignments in MatchBranchSimplification)
 - #162805 (Add `must_use` lint to `ExitCode`)
 - #162825 (core: Add examples for `debug_closure_helpers`)
 - #162841 (enable asm tests for xtensa targets)
 - #162842 (reintroduce check RibKind::ConstParamTy did in direct consts)
 - #162845 (mgca: fix issue with mismatched array valtree/valtree tys)
 - #162856 (Stabilize CommandExt::show_window)
 - #162865 (Complex conjugate, negation and default)
 - #162874 (Add support for `annotate_snippets::snippet::AnnotationKind::Visible`)
 - #162881 (Simplify the macro for forwarding Decoder methods )
 - #162888 (Fix a typo on the Armv7-R platform docs page)
rust-bors Bot pushed a commit that referenced this pull request Sep 17, 2026
…uwer

Rollup of 23 pull requests

Successful merges:

 - #161596 (coretests: Add more pattern tests.)
 - #162411 (Make Receiver `#[rustc_dyn_incompatible_trait]`)
 - #162760 (yeet alias new_from_def_id)
 - #162796 (libtest: do not early exit from test runners)
 - #162844 (Add loan reachability traces to polonius MIR dumps)
 - #162876 (Move operations out of `rustc_middle::query::job`)
 - #160108 (Stabilize `windows_process_extensions_main_thread_handle`)
 - #160212 (traits: Fix rigid alias liveness matching)
 - #160544 (Stabilize `feature(trim_prefix_suffix)` (`{str, [T], Path}::trim_prefix` and `{str, [T]}::trim_suffix`))
 - #161305 (Use the entire type of a dropped local to compute variance (edge direction) for Polonius alpha)
 - #161838 (tests: accept LLVM 24 optimization in this test)
 - #162312 (core: Rewrite docs for try_as_dyn)
 - #162785 (Avoid creating overlapping assignments in MatchBranchSimplification)
 - #162805 (Add `must_use` lint to `ExitCode`)
 - #162825 (core: Add examples for `debug_closure_helpers`)
 - #162841 (enable asm tests for xtensa targets)
 - #162842 (reintroduce check RibKind::ConstParamTy did in direct consts)
 - #162845 (mgca: fix issue with mismatched array valtree/valtree tys)
 - #162856 (Stabilize CommandExt::show_window)
 - #162865 (Complex conjugate, negation and default)
 - #162874 (Add support for `annotate_snippets::snippet::AnnotationKind::Visible`)
 - #162881 (Simplify the macro for forwarding Decoder methods )
 - #162888 (Fix a typo on the Armv7-R platform docs page)
@rust-bors
rust-bors Bot merged commit 15d7810 into rust-lang:main Sep 17, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 17, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 17, 2026
Rollup merge of #162876 - nnethercote:mv-ops-out-of-rustc_middle-query-job, r=Zalathar

Move operations out of `rustc_middle::query::job`

Generally `rustc_middle::query` has types while `rustc_query_impl` has operations. So this commit moves some operations from the former to the latter. Some of them are just moved, while others are inlined and removed.

r? @Zalathar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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.

3 participants