aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_project_model
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_project_model')
-rw-r--r--crates/ra_project_model/Cargo.toml2
-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
4 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_project_model/Cargo.toml b/crates/ra_project_model/Cargo.toml
index 27b1f5d33..171fe8626 100644
--- a/crates/ra_project_model/Cargo.toml
+++ b/crates/ra_project_model/Cargo.toml
@@ -17,7 +17,7 @@ cargo_metadata = "0.11.1"
17arena = { path = "../arena" } 17arena = { path = "../arena" }
18ra_cfg = { path = "../ra_cfg" } 18ra_cfg = { path = "../ra_cfg" }
19ra_db = { path = "../ra_db" } 19ra_db = { path = "../ra_db" }
20ra_toolchain = { path = "../ra_toolchain" } 20toolchain = { path = "../toolchain" }
21ra_proc_macro = { path = "../ra_proc_macro" } 21ra_proc_macro = { path = "../ra_proc_macro" }
22paths = { path = "../paths" } 22paths = { path = "../paths" }
23stdx = { path = "../stdx" } 23stdx = { path = "../stdx" }
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);