From a69996933a1c2ced981a530d47115be4005c8184 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Mon, 7 Dec 2020 20:39:29 +0100 Subject: Pass `--target` when loading out dirs from check --- crates/project_model/src/cargo_workspace.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crates/project_model') 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( ) -> 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 { -- cgit v1.2.3