Rename trait IntoQueryParam to IntoQueryKey#154028
Merged
rust-bors[bot] merged 2 commits intorust-lang:mainfrom Mar 18, 2026
Merged
Rename trait IntoQueryParam to IntoQueryKey#154028rust-bors[bot] merged 2 commits intorust-lang:mainfrom
IntoQueryParam to IntoQueryKey#154028rust-bors[bot] merged 2 commits intorust-lang:mainfrom
Conversation
nnethercote
reviewed
Mar 18, 2026
| use rustc_hir::def_id::{DefId, LocalDefId}; | ||
| use rustc_hir::hir_id::OwnerId; | ||
| use rustc_span::{Span, Spanned}; | ||
| pub use sealed::IntoQueryParam; |
Contributor
There was a problem hiding this comment.
I have no idea what this was trying to express.
Member
Author
There was a problem hiding this comment.
From the name, I’d guess that someone was intending to use the sealed-trait pattern, but missed the part that makes it actually work.
(And it isn’t useful for safe internal traits anyway.)
nnethercote
approved these changes
Mar 18, 2026
Contributor
|
@bors r+ rollup |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Mar 18, 2026
…cote Rename trait `IntoQueryParam` to `IntoQueryKey` This is in line with the general trend towards consistently referring to a query method parameter/argument as a “key”. In addition to the actual renaming, this PR also moves the trait out of `plumbing` and into its own file, and tweaks some of the occurrences of the trait to be more consistent with each other. r? nnethercote
This comment has been minimized.
This comment has been minimized.
Removing coherent and self-contained chunks of code from a catch-all "plumbing" module is typically an improvement. Giving the trait its own file also gets rid of the unhelpful `sealed` module that it was previously in.
All methods that accept `impl IntoQueryKey<_>` have been adjusted to consistently call `into_query_key` before doing anything else. When a function with a conversion trait calls another function with the same conversion trait, doing the conversion eagerly can reduce the overall number of instantiations.
563ec85 to
38aaeef
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. |
Member
Author
|
Rebased. @bors r=nnethercote |
Contributor
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.
This is in line with the general trend towards consistently referring to a query method parameter/argument as a “key”.
In addition to the actual renaming, this PR also moves the trait out of
plumbingand into its own file, and tweaks some of the occurrences of the trait to be more consistent with each other.r? nnethercote