Description
IDE plugins like RA like to invoke cargo check
with --all-targets
to ensure that tests and examples are checked as well, not just the main crate sources. However, this often fails on stable since it will also check benchmarks, which essentially always need nightly features (Cc crossbeam-rs/crossbeam#890).
So I thought I could work around this by telling RA to run "cargo" "check" "--lib" "--bins" "--tests" "--examples" "--workspace" "--message-format=json"
instead -- however, this command sadly will fail when there is no lib target. Is there a way to say "please check everything except for the benchmarks"?
The documentation claims that --all-targets
is equivalent to specifying --lib --bins --tests --benches --examples
, but that is wrong: --lib --bins --tests --benches --examples
will fail when there is no lib target, but --all-targets
will still work.