Skip to content

rustc --print doesn't list valid options #128930

@ChrisDenton

Description

@ChrisDenton

I tried using rustc --print and found the error message is very terse:

> rustc --print
error: Argument to option 'print' missing

Using an invalid option does list the valid ones:

> rustc --print help
error: unknown print request: `help`
  |
  = help: valid print requests are: `all-target-specs-json`, `calling-conventions`, `cfg`, `check-cfg`, `code-models`, `crate-name`, `deployment-target`, `file-names`, `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`

rustc --version --verbose

rustc 1.82.0-nightly (8b3870784 2024-08-07)
binary: rustc
commit-hash: 8b3870784f69d8ed2ae4246d1b56f150e3131499
commit-date: 2024-08-07
host: x86_64-pc-windows-msvc
release: 1.82.0-nightly
LLVM version: 19.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-CLIArea: Command-line interface (CLI) to the compilerC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions