diff options
Diffstat (limited to 'crates/ra_project_model/src/sysroot.rs')
-rw-r--r-- | crates/ra_project_model/src/sysroot.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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); |