Closed
Description
Problem
It is possible to run tests for various targets using cargo test --target [triple]
. When given an invalid triple, cargo indicates the user should run --print target-list
for help. However, this is not valid advice.
Steps
- Run
cargo test --target invalid-target
- Run the suggested
cargo test --print target-list
Possible Solution(s)
cargo should implement --print target-list
, or the advice should be removed.
Notes
Output of cargo version
: cargo 1.40.0 (bc8e4c8be 2019-11-22)
$ cargo test --target invalid-target
error: failed to run `rustc` to learn about target-specific information
Caused by:
process didn't exit successfully: `rustc - --crate-name ___ --print=file-names --target invalid-target --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 1)
--- stderr
error: Error loading target specification: Could not find specification for target "invalid-target"
|
= help: Use `--print target-list` for a list of built-in targets
$ cargo test --print target-list
error: Found argument '--print' which wasn't expected, or isn't valid in this context
USAGE:
cargo.exe test [OPTIONS] [TESTNAME] [-- <args>...]
For more information try --help
$
...