diff options
-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 b991b59a6..1700cb8a7 100644 --- a/crates/project_model/src/cargo_workspace.rs +++ b/crates/project_model/src/cargo_workspace.rs | |||
@@ -350,6 +350,11 @@ pub(crate) fn load_extern_resources( | |||
350 | let mut cmd = Command::new(toolchain::cargo()); | 350 | let mut cmd = Command::new(toolchain::cargo()); |
351 | cmd.args(&["check", "--message-format=json", "--manifest-path"]).arg(cargo_toml); | 351 | cmd.args(&["check", "--message-format=json", "--manifest-path"]).arg(cargo_toml); |
352 | 352 | ||
353 | // --all-targets includes tests, benches and examples in addition to the | ||
354 | // default lib and bins. This is an independent concept from the --targets | ||
355 | // flag below. | ||
356 | cmd.arg("--all-targets"); | ||
357 | |||
353 | if let Some(target) = &cargo_features.target { | 358 | if let Some(target) = &cargo_features.target { |
354 | cmd.args(&["--target", target]); | 359 | cmd.args(&["--target", target]); |
355 | } | 360 | } |