diff options
author | Jonas Schievink <[email protected]> | 2020-12-07 19:39:29 +0000 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2020-12-07 19:39:29 +0000 |
commit | a69996933a1c2ced981a530d47115be4005c8184 (patch) | |
tree | bedc10eca2e51fa8179993d2c820c0fafd6f4fd1 /crates | |
parent | 8a950dfb406a927085602af016855cfe1988aee1 (diff) |
Pass `--target` when loading out dirs from check
Diffstat (limited to 'crates')
-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 540b57ae4..50e5760b6 100644 --- a/crates/project_model/src/cargo_workspace.rs +++ b/crates/project_model/src/cargo_workspace.rs | |||
@@ -297,6 +297,11 @@ pub(crate) fn load_extern_resources( | |||
297 | ) -> Result<ExternResources> { | 297 | ) -> Result<ExternResources> { |
298 | let mut cmd = Command::new(toolchain::cargo()); | 298 | let mut cmd = Command::new(toolchain::cargo()); |
299 | cmd.args(&["check", "--message-format=json", "--manifest-path"]).arg(cargo_toml); | 299 | cmd.args(&["check", "--message-format=json", "--manifest-path"]).arg(cargo_toml); |
300 | |||
301 | if let Some(target) = &cargo_features.target { | ||
302 | cmd.args(&["--target", target]); | ||
303 | } | ||
304 | |||
300 | if cargo_features.all_features { | 305 | if cargo_features.all_features { |
301 | cmd.arg("--all-features"); | 306 | cmd.arg("--all-features"); |
302 | } else { | 307 | } else { |