From 7b3b0bad1fe992441ae1c954ac63528d600a5ce4 Mon Sep 17 00:00:00 2001 From: Kaelin Laundry Date: Mon, 28 Dec 2020 19:33:16 -0800 Subject: Pass --all-targets to "cargo check" --- crates/project_model/src/cargo_workspace.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crates') diff --git a/crates/project_model/src/cargo_workspace.rs b/crates/project_model/src/cargo_workspace.rs index bb3b6f2ef..3e0b40cbc 100644 --- a/crates/project_model/src/cargo_workspace.rs +++ b/crates/project_model/src/cargo_workspace.rs @@ -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]); } -- cgit v1.2.3