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.
Hello,
When we provide wrong value for the
--emitflag, we will get a list of valid values. This is not the case for--crate-typeflag, which should also display valid values.The
--emitexample:The
--crate-typeexample:Versions:
I have also tested this on rustc 1.42.0 and it is the same.