Skip to content

Rename trait IntoQueryParam to IntoQueryKey#154028

Merged
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
Zalathar:into-query-key
Mar 18, 2026
Merged

Rename trait IntoQueryParam to IntoQueryKey#154028
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
Zalathar:into-query-key

Conversation

@Zalathar
Copy link
Member

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

@rustbot rustbot added 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 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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea what this was trying to express.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 18, 2026

📌 Commit 563ec85 has been approved by nnethercote

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 Mar 18, 2026
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
@rust-bors rust-bors bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 18, 2026
@rust-bors

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.
@rustbot
Copy link
Collaborator

rustbot commented Mar 18, 2026

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.

@Zalathar
Copy link
Member Author

Rebased.

@bors r=nnethercote

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 18, 2026

📌 Commit 38aaeef has been approved by nnethercote

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 18, 2026
rust-bors bot pushed a commit that referenced this pull request Mar 18, 2026
Rollup of 3 pull requests

Successful merges:

 - #153580 (Handle statics and TLS in raw-dylib for ELF)
 - #154020 (Moved tests/ui/issues/issue-23891.rs to tests/ui/macros/)
 - #154028 (Rename trait `IntoQueryParam` to `IntoQueryKey`)
@rust-bors rust-bors bot merged commit 205d100 into rust-lang:main Mar 18, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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