Closed
Description
Hello,
When we provide wrong value for the --emit
flag, we will get a list of valid values. This is not the case for --crate-type
flag, which should also display valid values.
The --emit
example:
$ cargo rustc -- --emit=asd
Compiling tokio v0.2.13 (/host/tokio/tokio)
error: unknown emission type: `asd` - expected one of: `llvm-bc`, `asm`, `llvm-ir`, `mir`, `obj`, `metadata`, `link`, `dep-info`
The --crate-type
example:
$ cargo rustc -- --crate-type=dynlib
Compiling tokio v0.2.13 (/host/tokio/tokio)
error: unknown crate type: `dynlib`
error: could not compile `tokio`.
To learn more, run the command again with --verbose.
Versions:
$ cargo --version
cargo 1.41.0 (626f0f40e 2019-12-03)
r$ rustc --version
rustc 1.41.0 (5e1a79984 2020-01-27)
I have also tested this on rustc 1.42.0 and it is the same.
Metadata
Metadata
Assignees
Labels
Area: Command-line interface (CLI) to the compilerArea: Messages for errors, warnings, and lintsDiagnostics: An error or lint that needs small tweaks.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Relevant to the compiler team, which will review and decide on the PR/issue.