aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_project_model/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_project_model/src')
-rw-r--r--crates/ra_project_model/src/cargo_workspace.rs4
-rw-r--r--crates/ra_project_model/src/lib.rs2
-rw-r--r--crates/ra_project_model/src/sysroot.rs4
3 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_project_model/src/cargo_workspace.rs b/crates/ra_project_model/src/cargo_workspace.rs
index a526d743d..abf8dca96 100644
--- a/crates/ra_project_model/src/cargo_workspace.rs
+++ b/crates/ra_project_model/src/cargo_workspace.rs
@@ -140,7 +140,7 @@ impl CargoWorkspace {
140 cargo_features: &CargoConfig, 140 cargo_features: &CargoConfig,
141 ) -> Result<CargoWorkspace> { 141 ) -> Result<CargoWorkspace> {
142 let mut meta = MetadataCommand::new(); 142 let mut meta = MetadataCommand::new();
143 meta.cargo_path(ra_toolchain::cargo()); 143 meta.cargo_path(toolchain::cargo());
144 meta.manifest_path(cargo_toml.to_path_buf()); 144 meta.manifest_path(cargo_toml.to_path_buf());
145 if cargo_features.all_features { 145 if cargo_features.all_features {
146 meta.features(CargoOpt::AllFeatures); 146 meta.features(CargoOpt::AllFeatures);
@@ -288,7 +288,7 @@ pub fn load_extern_resources(
288 cargo_toml: &Path, 288 cargo_toml: &Path,
289 cargo_features: &CargoConfig, 289 cargo_features: &CargoConfig,
290) -> Result<ExternResources> { 290) -> Result<ExternResources> {
291 let mut cmd = Command::new(ra_toolchain::cargo()); 291 let mut cmd = Command::new(toolchain::cargo());
292 cmd.args(&["check", "--message-format=json", "--manifest-path"]).arg(cargo_toml); 292 cmd.args(&["check", "--message-format=json", "--manifest-path"]).arg(cargo_toml);
293 if cargo_features.all_features { 293 if cargo_features.all_features {
294 cmd.arg("--all-features"); 294 cmd.arg("--all-features");
diff --git a/crates/ra_project_model/src/lib.rs b/crates/ra_project_model/src/lib.rs
index 300e75135..46f44910c 100644
--- a/crates/ra_project_model/src/lib.rs
+++ b/crates/ra_project_model/src/lib.rs
@@ -513,7 +513,7 @@ fn get_rustc_cfg_options(target: Option<&str>) -> Vec<CfgFlag> {
513 } 513 }
514 514
515 let rustc_cfgs = { 515 let rustc_cfgs = {
516 let mut cmd = Command::new(ra_toolchain::rustc()); 516 let mut cmd = Command::new(toolchain::rustc());
517 cmd.args(&["--print", "cfg", "-O"]); 517 cmd.args(&["--print", "cfg", "-O"]);
518 if let Some(target) = target { 518 if let Some(target) = target {
519 cmd.args(&["--target", target]); 519 cmd.args(&["--target", target]);
diff --git a/crates/ra_project_model/src/sysroot.rs b/crates/ra_project_model/src/sysroot.rs
index 6ef001769..8239797b6 100644
--- a/crates/ra_project_model/src/sysroot.rs
+++ b/crates/ra_project_model/src/sysroot.rs
@@ -101,13 +101,13 @@ fn get_or_install_rust_src(cargo_toml: &AbsPath) -> Result<AbsPathBuf> {
101 return Ok(path); 101 return Ok(path);
102 } 102 }
103 let current_dir = cargo_toml.parent().unwrap(); 103 let current_dir = cargo_toml.parent().unwrap();
104 let mut rustc = Command::new(ra_toolchain::rustc()); 104 let mut rustc = Command::new(toolchain::rustc());
105 rustc.current_dir(current_dir).args(&["--print", "sysroot"]); 105 rustc.current_dir(current_dir).args(&["--print", "sysroot"]);
106 let stdout = utf8_stdout(rustc)?; 106 let stdout = utf8_stdout(rustc)?;
107 let sysroot_path = AbsPath::assert(Path::new(stdout.trim())); 107 let sysroot_path = AbsPath::assert(Path::new(stdout.trim()));
108 let mut src = get_rust_src(sysroot_path); 108 let mut src = get_rust_src(sysroot_path);
109 if src.is_none() { 109 if src.is_none() {
110 let mut rustup = Command::new(ra_toolchain::rustup()); 110 let mut rustup = Command::new(toolchain::rustup());
111 rustup.current_dir(current_dir).args(&["component", "add", "rust-src"]); 111 rustup.current_dir(current_dir).args(&["component", "add", "rust-src"]);
112 utf8_stdout(rustup)?; 112 utf8_stdout(rustup)?;
113 src = get_rust_src(sysroot_path); 113 src = get_rust_src(sysroot_path);