Skip to content

Allow trailing comma after argument in query definition #141284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2025

Conversation

compiler-errors
Copy link
Member

Don't catastrophically fail the query macro if you put a comma after your query key!

r? oli-obk

@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 May 20, 2025
@oli-obk
Copy link
Contributor

oli-obk commented May 20, 2025

We could separately error on it by emitting a compile_error! so that it's still an error, but doesn't have all the noise of $everything not existing

@compiler-errors
Copy link
Member Author

Why would we want it to be an error?

@oli-obk
Copy link
Contributor

oli-obk commented May 21, 2025

consistency so there aren't some with and some without commas, but not very important

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented May 21, 2025

📌 Commit 37260e1 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors 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 May 21, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request May 21, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#137759 (Add `std::os::unix::process::CommandExt::chroot` to safely chroot a child process)
 - rust-lang#140994 (replace `cc_detect::cc2ar` with `cc::try_get_archiver`)
 - rust-lang#141213 (Suggest use "{}", self.x instead of {self.x} when resolve x as field of `self`)
 - rust-lang#141283 (Allow `x perf` to find rustc.exe on Windows)
 - rust-lang#141284 (Allow trailing comma after argument in query definition)
 - rust-lang#141317 (typeck: catch `continue`s pointing to blocks)
 - rust-lang#141318 (Avoid creating an empty identifer in `Symbol::to_ident_string`.)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e4836fb into rust-lang:master May 21, 2025
6 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 21, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 21, 2025
Rollup merge of rust-lang#141284 - compiler-errors:query-nit, r=oli-obk

Allow trailing comma after argument in query definition

Don't catastrophically fail the query macro if you put a comma after your query key!

r? oli-obk
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.

4 participants