Skip to content

rustc --print=foo=file is not documented in rustc --help -v #139794

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
RalfJung opened this issue Apr 14, 2025 · 0 comments · Fixed by #139799
Closed

rustc --print=foo=file is not documented in rustc --help -v #139794

RalfJung opened this issue Apr 14, 2025 · 0 comments · Fixed by #139799
Labels
A-CLI Area: Command-line interface (CLI) to the compiler A-diagnostics Area: Messages for errors, warnings, and lints A-print-requests Area: print requests (`--print=...`) C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@RalfJung
Copy link
Member

I recently learned from @Urgau that one can use something like rustc --print=cfg=file.txt to have rustc dump the output into a file rather than to stdout. This is mentioned in the rustc book but should also be documented in rustc --help -v.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 14, 2025
@jieyouxu jieyouxu 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. A-CLI Area: Command-line interface (CLI) to the compiler A-print-requests Area: print requests (`--print=...`) C-enhancement Category: An issue proposing an enhancement or a PR with one. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Apr 14, 2025
Zalathar added a commit to Zalathar/rust that referenced this issue Apr 15, 2025
Specify `--print info=file` syntax in `--help`

Closes rust-lang#139794

I moved the listing of information that can be printed to the help string as it's getting rather long and it makes the `[=FILE]` part easier to see
@bors bors closed this as completed in 7dc3fec Apr 15, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Apr 15, 2025
Rollup merge of rust-lang#139799 - clubby789:print=file, r=jieyouxu

Specify `--print info=file` syntax in `--help`

Closes rust-lang#139794

I moved the listing of information that can be printed to the help string as it's getting rather long and it makes the `[=FILE]` part easier to see
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CLI Area: Command-line interface (CLI) to the compiler A-diagnostics Area: Messages for errors, warnings, and lints A-print-requests Area: print requests (`--print=...`) C-enhancement Category: An issue proposing an enhancement or a PR with one. 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.

3 participants