Pass --all-targets to "cargo check"

This commit is contained in:
Kaelin Laundry 2020-12-28 19:33:16 -08:00
parent 77ad203a71
commit 7b3b0bad1f

View File

@ -334,6 +334,11 @@ pub(crate) fn load_extern_resources(
let mut cmd = Command::new(toolchain::cargo());
cmd.args(&["check", "--message-format=json", "--manifest-path"]).arg(cargo_toml);
// --all-targets includes tests, benches and examples in addition to the
// default lib and bins. This is an independent concept from the --targets
// flag below.
cmd.arg("--all-targets");
if let Some(target) = &cargo_features.target {
cmd.args(&["--target", target]);
}