diff options
author | Kaelin Laundry <[email protected]> | 2020-12-29 03:33:16 +0000 |
---|---|---|
committer | Kaelin Laundry <[email protected]> | 2020-12-29 03:33:16 +0000 |
commit | 7b3b0bad1fe992441ae1c954ac63528d600a5ce4 (patch) | |
tree | 076c127dc964b1438e6f855b730d01f64da271c5 | |
parent | 77ad203a719be074e81485af7a4fb02fac6cbf61 (diff) |
Pass --all-targets to "cargo check"
-rw-r--r-- | crates/project_model/src/cargo_workspace.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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( | |||
334 | let mut cmd = Command::new(toolchain::cargo()); | 334 | let mut cmd = Command::new(toolchain::cargo()); |
335 | cmd.args(&["check", "--message-format=json", "--manifest-path"]).arg(cargo_toml); | 335 | cmd.args(&["check", "--message-format=json", "--manifest-path"]).arg(cargo_toml); |
336 | 336 | ||
337 | // --all-targets includes tests, benches and examples in addition to the | ||
338 | // default lib and bins. This is an independent concept from the --targets | ||
339 | // flag below. | ||
340 | cmd.arg("--all-targets"); | ||
341 | |||
337 | if let Some(target) = &cargo_features.target { | 342 | if let Some(target) = &cargo_features.target { |
338 | cmd.args(&["--target", target]); | 343 | cmd.args(&["--target", target]); |
339 | } | 344 | } |