diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-12-07 19:42:08 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-07 19:42:08 +0000 |
commit | d6aa1ba7d4c4e7cd0f82f3d0d4f8ec3c364dfc6a (patch) | |
tree | 50057b377e50c66a18c3fb89efed336244cab552 /crates/project_model | |
parent | 7380ec557dd61331c9680c655fe6d28a0fbf5b79 (diff) | |
parent | a69996933a1c2ced981a530d47115be4005c8184 (diff) |
Merge #6752
6752: Pass `--target` when loading out dirs from check r=jonas-schievink a=jonas-schievink
bors r+
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/project_model')
-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 { |