From a69996933a1c2ced981a530d47115be4005c8184 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Mon, 7 Dec 2020 20:39:29 +0100 Subject: [PATCH] Pass `--target` when loading out dirs from check --- crates/project_model/src/cargo_workspace.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/project_model/src/cargo_workspace.rs b/crates/project_model/src/cargo_workspace.rs index 540b57ae4c..50e5760b6c 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( ) -> Result { let mut cmd = Command::new(toolchain::cargo()); cmd.args(&["check", "--message-format=json", "--manifest-path"]).arg(cargo_toml); + + if let Some(target) = &cargo_features.target { + cmd.args(&["--target", target]); + } + if cargo_features.all_features { cmd.arg("--all-features"); } else {