compiler: Rename several types/traits for per-query vtables#151666
Merged
rust-bors[bot] merged 2 commits intorust-lang:mainfrom Jan 28, 2026
Merged
compiler: Rename several types/traits for per-query vtables#151666rust-bors[bot] merged 2 commits intorust-lang:mainfrom
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
Conversation
Member
Author
|
As a follow-up PR, I might try getting rid of That would sidestep the need to name and document the trait. EDIT: This turns out to be a bit tricky; I would want to land a few other simplifications before trying again. |
4f1952f to
b0532b2
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
b0532b2 to
2c9175d
Compare
Collaborator
|
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. |
Kivooeo
approved these changes
Jan 27, 2026
Member
|
@bors r+ rollup |
Contributor
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jan 27, 2026
compiler: Rename several types/traits for per-query vtables - Follow-up to rust-lang#151577 --- This is another round of renaming for some subtle types and traits used by the query system, to hopefully make them easier to understand. Key renames: - struct `DynamicQuery` → `QueryVTable` (the actual vtable-like structure) - struct `DynamicQueries` → `PerQueryVTables` (holds a vtable for each query) - trait `QueryConfig` → `QueryDispatcher` - (used by generic functions in `rustc_query_system` to interact with query vtables) - struct `DynamicConfig` → `SemiDynamicQueryDispatcher` - (implements `QueryDispatcher` by combining a vtable with some compile-time boolean flags for improved perf) - trait `QueryConfigRestored` → `UnerasedQueryDispatcher` - (provides a `QueryDispatcher` while also remembering the query's unerased value type; allows some per-query code to be moved out of macros and into generic functions) This was trickier than `DepKindVTable`, because there are more types and traits involved, and it's harder to come up with distinctive and useful names for all of them. There should be no change to compiler behaviour. r? Kivooeo (or compiler)
rust-bors bot
pushed a commit
that referenced
this pull request
Jan 27, 2026
Rollup of 6 pull requests Successful merges: - #151751 (`rust-analyzer` subtree update) - #150893 (offload: move (un)register lib into global_ctors) - #151013 (Add some clarifications and fixes for fmt syntax) - #151666 (compiler: Rename several types/traits for per-query vtables) - #151738 (Add `extern crate core` to diagnostic tests) - #151759 (Update `browser-ui-test` version to `0.23.3`)
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jan 27, 2026
compiler: Rename several types/traits for per-query vtables - Follow-up to rust-lang#151577 --- This is another round of renaming for some subtle types and traits used by the query system, to hopefully make them easier to understand. Key renames: - struct `DynamicQuery` → `QueryVTable` (the actual vtable-like structure) - struct `DynamicQueries` → `PerQueryVTables` (holds a vtable for each query) - trait `QueryConfig` → `QueryDispatcher` - (used by generic functions in `rustc_query_system` to interact with query vtables) - struct `DynamicConfig` → `SemiDynamicQueryDispatcher` - (implements `QueryDispatcher` by combining a vtable with some compile-time boolean flags for improved perf) - trait `QueryConfigRestored` → `UnerasedQueryDispatcher` - (provides a `QueryDispatcher` while also remembering the query's unerased value type; allows some per-query code to be moved out of macros and into generic functions) This was trickier than `DepKindVTable`, because there are more types and traits involved, and it's harder to come up with distinctive and useful names for all of them. There should be no change to compiler behaviour. r? Kivooeo (or compiler)
rust-bors bot
pushed a commit
that referenced
this pull request
Jan 27, 2026
Rollup of 6 pull requests Successful merges: - #150893 (offload: move (un)register lib into global_ctors) - #151013 (Add some clarifications and fixes for fmt syntax) - #151449 ([rustdoc] Add regression test for #151411) - #151666 (compiler: Rename several types/traits for per-query vtables) - #151738 (Add `extern crate core` to diagnostic tests) - #151759 (Update `browser-ui-test` version to `0.23.3`)
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Jan 27, 2026
compiler: Rename several types/traits for per-query vtables - Follow-up to rust-lang#151577 --- This is another round of renaming for some subtle types and traits used by the query system, to hopefully make them easier to understand. Key renames: - struct `DynamicQuery` → `QueryVTable` (the actual vtable-like structure) - struct `DynamicQueries` → `PerQueryVTables` (holds a vtable for each query) - trait `QueryConfig` → `QueryDispatcher` - (used by generic functions in `rustc_query_system` to interact with query vtables) - struct `DynamicConfig` → `SemiDynamicQueryDispatcher` - (implements `QueryDispatcher` by combining a vtable with some compile-time boolean flags for improved perf) - trait `QueryConfigRestored` → `UnerasedQueryDispatcher` - (provides a `QueryDispatcher` while also remembering the query's unerased value type; allows some per-query code to be moved out of macros and into generic functions) This was trickier than `DepKindVTable`, because there are more types and traits involved, and it's harder to come up with distinctive and useful names for all of them. There should be no change to compiler behaviour. r? Kivooeo (or compiler)
rust-bors bot
pushed a commit
that referenced
this pull request
Jan 28, 2026
Rollup of 6 pull requests Successful merges: - #150893 (offload: move (un)register lib into global_ctors) - #151013 (Add some clarifications and fixes for fmt syntax) - #151449 ([rustdoc] Add regression test for #151411) - #151666 (compiler: Rename several types/traits for per-query vtables) - #151738 (Add `extern crate core` to diagnostic tests) - #151759 (Update `browser-ui-test` version to `0.23.3`)
This was referenced Jan 28, 2026
rust-bors bot
pushed a commit
that referenced
this pull request
Jan 28, 2026
Rollup of 9 pull requests Successful merges: - #151239 (Support trait objects in type info reflection) - #150893 (offload: move (un)register lib into global_ctors) - #151013 (Add some clarifications and fixes for fmt syntax) - #151666 (compiler: Rename several types/traits for per-query vtables) - #151738 (Add `extern crate core` to diagnostic tests) - #151747 (Update `askama` version to `0.15.2`) - #151759 (Update `browser-ui-test` version to `0.23.3`) - #151763 (Add FileCheck annotations to simplify_match.rs) - #151766 (Fix `x fix`, again)
rust-timer
added a commit
that referenced
this pull request
Jan 28, 2026
Rollup merge of #151666 - Zalathar:query-vtable, r=Kivooeo compiler: Rename several types/traits for per-query vtables - Follow-up to #151577 --- This is another round of renaming for some subtle types and traits used by the query system, to hopefully make them easier to understand. Key renames: - struct `DynamicQuery` → `QueryVTable` (the actual vtable-like structure) - struct `DynamicQueries` → `PerQueryVTables` (holds a vtable for each query) - trait `QueryConfig` → `QueryDispatcher` - (used by generic functions in `rustc_query_system` to interact with query vtables) - struct `DynamicConfig` → `SemiDynamicQueryDispatcher` - (implements `QueryDispatcher` by combining a vtable with some compile-time boolean flags for improved perf) - trait `QueryConfigRestored` → `UnerasedQueryDispatcher` - (provides a `QueryDispatcher` while also remembering the query's unerased value type; allows some per-query code to be moved out of macros and into generic functions) This was trickier than `DepKindVTable`, because there are more types and traits involved, and it's harder to come up with distinctive and useful names for all of them. There should be no change to compiler behaviour. r? Kivooeo (or compiler)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DepKindStructtoDepKindVTable#151577This is another round of renaming for some subtle types and traits used by the query system, to hopefully make them easier to understand.
Key renames:
DynamicQuery→QueryVTable(the actual vtable-like structure)DynamicQueries→PerQueryVTables(holds a vtable for each query)QueryConfig→QueryDispatcherrustc_query_systemto interact with query vtables)DynamicConfig→SemiDynamicQueryDispatcherQueryDispatcherby combining a vtable with some compile-time boolean flags for improved perf)QueryConfigRestored→UnerasedQueryDispatcherQueryDispatcherwhile also remembering the query's unerased value type; allows some per-query code to be moved out of macros and into generic functions)This was trickier than
DepKindVTable, because there are more types and traits involved, and it's harder to come up with distinctive and useful names for all of them.There should be no change to compiler behaviour.
r? Kivooeo (or compiler)