Skip to content

Suggest -Whelp if --print=lints is specified #138612

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

Closed
lolbinarycat opened this issue Mar 17, 2025 · 1 comment · Fixed by #138700
Closed

Suggest -Whelp if --print=lints is specified #138612

lolbinarycat opened this issue Mar 17, 2025 · 1 comment · Fixed by #138700
Assignees
Labels
A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@lolbinarycat
Copy link
Contributor

lolbinarycat commented Mar 17, 2025

Code

rustc --print lints

Current output

error: unknown print request: `lints`
  |
  = help: valid print requests are: `all-target-specs-json`, `calling-conventions`, `cfg`, `check-cfg`, `code-models`, `crate-name`, `deployment-target`, `file-names`, `host-tuple`, `link-args`, `native-static-libs`, `relocation-models`, `split-debuginfo`, `stack-protector-strategies`, `sysroot`, `target-cpus`, `target-features`, `target-libdir`, `target-list`, `target-spec-json`, `tls-models`

Desired output

error: unknown print request: `lints`
  |
  = help: valid print requests are: `all-target-specs-json`, `calling-conventions`, `cfg`, `check-cfg`, `code-models`, `crate-name`, `deployment-target`, `file-names`, `host-tuple`, `link-args`, `native-static-libs`, `relocation-models`, `split-debuginfo`, `stack-protector-strategies`, `sysroot`, `target-cpus`, `target-features`, `target-libdir`, `target-list`, `target-spec-json`, `tls-models`
  |
  = help: use `-Whelp` to print a list of lints

Rationale and extra context

This is a bit intuitive and confused me a while ago

Other cases

This help message should probably show for `--print lint` and any other arg that contains "lint".

Rust Version

rustc 1.87.0-nightly (00f245915 2025-02-26)
binary: rustc
commit-hash: 00f245915b0c7839d42c26f9628220c4f1b93bf6
commit-date: 2025-02-26
host: x86_64-unknown-linux-gnu
release: 1.87.0-nightly
LLVM version: 20.1.0

Anything else?

No response

@lolbinarycat lolbinarycat added A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 17, 2025
@xizheyin
Copy link
Contributor

@rustbot claim

jieyouxu added a commit to jieyouxu/rust that referenced this issue Mar 20, 2025
Suggest `-Whelp` when pass `--print lints` to rustc

Closes rust-lang#138612
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 20, 2025
Suggest `-Whelp` when pass `--print lints` to rustc

Closes rust-lang#138612
@bors bors closed this as completed in 28fc422 Mar 21, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Mar 21, 2025
Rollup merge of rust-lang#138700 - xizheyin:issue-138612, r=Nadrieril

Suggest `-Whelp` when pass `--print lints` to rustc

Closes rust-lang#138612
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants