Skip to content

Query cleanups#151978

Merged
rust-bors[bot] merged 4 commits intorust-lang:mainfrom
nnethercote:query-cleanups
Feb 3, 2026
Merged

Query cleanups#151978
rust-bors[bot] merged 4 commits intorust-lang:mainfrom
nnethercote:query-cleanups

Conversation

@nnethercote
Copy link
Contributor

A few small cleanups in the query system.

r? @Zalathar

It doesn't use `self`, which means it doesn't need to be part of the
`QueryContext` trait; we can just call `extract` directly where
necessary.
Various `QueryStackFrame` variables are called `query`; `frame` is a
better name. And various `QueryInfo` variables are called `frame`;
`info` is a better name.

This eliminates some confusing `query.query()` occurrences, which is a
good sign, and some `frame.query` occurrences become `info.frame`.
Putting `+ 'tcx` on the `QueryDispatcher` trait lets a few other places
be simplified.
It's defined and used in `rustc_query_impl`; `rustc_query_system`
doesn't need it. So it can just be an inherent method on `QueryCtxt`.
@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 Feb 2, 2026
@Zalathar
Copy link
Member

Zalathar commented Feb 2, 2026

@Zalathar
Copy link
Member

Zalathar commented Feb 2, 2026

This all looks straightforward and good.

r=me when PR CI is green.

@nnethercote
Copy link
Contributor Author

All green.

@bors r=Zalathar rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 2, 2026

📌 Commit c6afd45 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 Feb 2, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Feb 2, 2026
…thar

Query cleanups

A few small cleanups in the query system.

r? @Zalathar
rust-bors bot pushed a commit that referenced this pull request Feb 2, 2026
Rollup of 5 pull requests

Successful merges:

 - #151825 (more float constants)
 - #151958 (Add codegen test for SLP vectorization)
 - #151974 (Update documentation for `Result::ok()`)
 - #151978 (Query cleanups)
 - #151979 (Fix uninitialized UEFI globals in tests)
jhpratt added a commit to jhpratt/rust that referenced this pull request Feb 2, 2026
…thar

Query cleanups

A few small cleanups in the query system.

r? @Zalathar
rust-bors bot pushed a commit that referenced this pull request Feb 2, 2026
Rollup of 5 pull requests

Successful merges:

 - #151938 (Use `#![feature(adt_const_params)]` for static query flags)
 - #151825 (more float constants)
 - #151974 (Update documentation for `Result::ok()`)
 - #151978 (Query cleanups)
 - #151979 (Fix uninitialized UEFI globals in tests)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 2, 2026
…thar

Query cleanups

A few small cleanups in the query system.

r? @Zalathar
rust-bors bot pushed a commit that referenced this pull request Feb 2, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - #150992 (link modifier `export-symbols`: export all global symbols from selected uptream c static libraries)
 - #151695 (compiletest: Support `--extern` modifiers with `proc-macro` directive)
 - #151938 (Use `#![feature(adt_const_params)]` for static query flags)
 - #151172 (Use default field values in a few more cases)
 - #151825 (more float constants)
 - #151870 (regression test for alias-relate changes in lub)
 - #151902 (explain why we dont skip some of this work when there are field projections)
 - #151974 (Update documentation for `Result::ok()`)
 - #151978 (Query cleanups)
 - #151979 (Fix uninitialized UEFI globals in tests)
 - #151992 (Port `#[rustc_hidden_type_of_opaque]` to attribute parser)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 2, 2026
…thar

Query cleanups

A few small cleanups in the query system.

r? @Zalathar
rust-bors bot pushed a commit that referenced this pull request Feb 2, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #149596 (resolve: Report more visibility-related early resolution ambiguities for imports)
 - #151695 (compiletest: Support `--extern` modifiers with `proc-macro` directive)
 - #151938 (Use `#![feature(adt_const_params)]` for static query flags)
 - #151172 (Use default field values in a few more cases)
 - #151825 (more float constants)
 - #151870 (regression test for alias-relate changes in lub)
 - #151872 (Add inline syntax for diagnostic messages)
 - #151902 (explain why we dont skip some of this work when there are field projections)
 - #151909 (Skip overlapping spans in argument error suggestions)
 - #151978 (Query cleanups)
 - #151979 (Fix uninitialized UEFI globals in tests)
 - #151992 (Port `#[rustc_hidden_type_of_opaque]` to attribute parser)
rust-bors bot pushed a commit that referenced this pull request Feb 2, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #149596 (resolve: Report more visibility-related early resolution ambiguities for imports)
 - #151695 (compiletest: Support `--extern` modifiers with `proc-macro` directive)
 - #151938 (Use `#![feature(adt_const_params)]` for static query flags)
 - #151172 (Use default field values in a few more cases)
 - #151825 (more float constants)
 - #151870 (regression test for alias-relate changes in lub)
 - #151872 (Add inline syntax for diagnostic messages)
 - #151902 (explain why we dont skip some of this work when there are field projections)
 - #151909 (Skip overlapping spans in argument error suggestions)
 - #151978 (Query cleanups)
 - #151979 (Fix uninitialized UEFI globals in tests)
 - #151992 (Port `#[rustc_hidden_type_of_opaque]` to attribute parser)
rust-bors bot pushed a commit that referenced this pull request Feb 3, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #149596 (resolve: Report more visibility-related early resolution ambiguities for imports)
 - #151695 (compiletest: Support `--extern` modifiers with `proc-macro` directive)
 - #151938 (Use `#![feature(adt_const_params)]` for static query flags)
 - #151172 (Use default field values in a few more cases)
 - #151825 (more float constants)
 - #151870 (regression test for alias-relate changes in lub)
 - #151872 (Add inline syntax for diagnostic messages)
 - #151902 (explain why we dont skip some of this work when there are field projections)
 - #151909 (Skip overlapping spans in argument error suggestions)
 - #151978 (Query cleanups)
 - #151979 (Fix uninitialized UEFI globals in tests)
 - #151992 (Port `#[rustc_hidden_type_of_opaque]` to attribute parser)
@rust-bors rust-bors bot merged commit 9625c1e into rust-lang:main Feb 3, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 3, 2026
rust-timer added a commit that referenced this pull request Feb 3, 2026
Rollup merge of #151978 - nnethercote:query-cleanups, r=Zalathar

Query cleanups

A few small cleanups in the query system.

r? @Zalathar
@nnethercote nnethercote deleted the query-cleanups branch February 3, 2026 06:30
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