-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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
$
...
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.