mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 14:13:58 +00:00
Merge #6752
6752: Pass `--target` when loading out dirs from check r=jonas-schievink a=jonas-schievink bors r+ Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
This commit is contained in:
commit
d6aa1ba7d4
1 changed files with 5 additions and 0 deletions
|
@ -297,6 +297,11 @@ pub(crate) fn load_extern_resources(
|
||||||
) -> Result<ExternResources> {
|
) -> Result<ExternResources> {
|
||||||
let mut cmd = Command::new(toolchain::cargo());
|
let mut cmd = Command::new(toolchain::cargo());
|
||||||
cmd.args(&["check", "--message-format=json", "--manifest-path"]).arg(cargo_toml);
|
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 {
|
if cargo_features.all_features {
|
||||||
cmd.arg("--all-features");
|
cmd.arg("--all-features");
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue