diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-05-08 13:55:55 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-05-08 13:55:55 +0100 |
commit | 51e4b92c1eee25cb6bf1b5ec8e7633dfc5f67a45 (patch) | |
tree | 871ebe102579fd2c8a35d2d5df4ed18b27219fd6 /crates/ra_project_model/src/cargo_workspace.rs | |
parent | 8295a9340c1fbda805497035054ead0b10c0d88e (diff) | |
parent | ecff5dc141046c5b9e40639657247a05fb9b0344 (diff) |
Merge #4375
4375: Cleanup toolchain handling r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_project_model/src/cargo_workspace.rs')
-rw-r--r-- | crates/ra_project_model/src/cargo_workspace.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_project_model/src/cargo_workspace.rs b/crates/ra_project_model/src/cargo_workspace.rs index eb9f33ee8..082af4f96 100644 --- a/crates/ra_project_model/src/cargo_workspace.rs +++ b/crates/ra_project_model/src/cargo_workspace.rs | |||
@@ -11,7 +11,6 @@ use anyhow::{Context, Result}; | |||
11 | use cargo_metadata::{BuildScript, CargoOpt, Message, MetadataCommand, PackageId}; | 11 | use cargo_metadata::{BuildScript, CargoOpt, Message, MetadataCommand, PackageId}; |
12 | use ra_arena::{Arena, Idx}; | 12 | use ra_arena::{Arena, Idx}; |
13 | use ra_db::Edition; | 13 | use ra_db::Edition; |
14 | use ra_env::get_path_for_executable; | ||
15 | use rustc_hash::FxHashMap; | 14 | use rustc_hash::FxHashMap; |
16 | 15 | ||
17 | /// `CargoWorkspace` represents the logical structure of, well, a Cargo | 16 | /// `CargoWorkspace` represents the logical structure of, well, a Cargo |
@@ -147,7 +146,7 @@ impl CargoWorkspace { | |||
147 | cargo_features: &CargoConfig, | 146 | cargo_features: &CargoConfig, |
148 | ) -> Result<CargoWorkspace> { | 147 | ) -> Result<CargoWorkspace> { |
149 | let mut meta = MetadataCommand::new(); | 148 | let mut meta = MetadataCommand::new(); |
150 | meta.cargo_path(get_path_for_executable("cargo")?); | 149 | meta.cargo_path(ra_toolchain::cargo()); |
151 | meta.manifest_path(cargo_toml); | 150 | meta.manifest_path(cargo_toml); |
152 | if cargo_features.all_features { | 151 | if cargo_features.all_features { |
153 | meta.features(CargoOpt::AllFeatures); | 152 | meta.features(CargoOpt::AllFeatures); |
@@ -289,7 +288,7 @@ pub fn load_extern_resources( | |||
289 | cargo_toml: &Path, | 288 | cargo_toml: &Path, |
290 | cargo_features: &CargoConfig, | 289 | cargo_features: &CargoConfig, |
291 | ) -> Result<ExternResources> { | 290 | ) -> Result<ExternResources> { |
292 | let mut cmd = Command::new(get_path_for_executable("cargo")?); | 291 | let mut cmd = Command::new(ra_toolchain::cargo()); |
293 | cmd.args(&["check", "--message-format=json", "--manifest-path"]).arg(cargo_toml); | 292 | cmd.args(&["check", "--message-format=json", "--manifest-path"]).arg(cargo_toml); |
294 | if cargo_features.all_features { | 293 | if cargo_features.all_features { |
295 | cmd.arg("--all-features"); | 294 | cmd.arg("--all-features"); |