Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/project-model/src/sysroot.rs')
-rw-r--r--crates/project-model/src/sysroot.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/project-model/src/sysroot.rs b/crates/project-model/src/sysroot.rs
index ea24393ed8..a486a38510 100644
--- a/crates/project-model/src/sysroot.rs
+++ b/crates/project-model/src/sysroot.rs
@@ -12,7 +12,7 @@ use itertools::Itertools;
use la_arena::{Arena, Idx};
use paths::{AbsPath, AbsPathBuf};
use rustc_hash::FxHashMap;
-use toolchain::probe_for_binary;
+use toolchain::{probe_for_binary, Tool};
use crate::{utf8_stdout, CargoConfig, CargoWorkspace, ManifestPath};
@@ -411,7 +411,7 @@ fn discover_sysroot_dir(
current_dir: &AbsPath,
extra_env: &FxHashMap<String, String>,
) -> Result<AbsPathBuf> {
- let mut rustc = Command::new(toolchain::rustc());
+ let mut rustc = Command::new(Tool::Rustc.path());
rustc.envs(extra_env);
rustc.current_dir(current_dir).args(["--print", "sysroot"]);
tracing::debug!("Discovering sysroot by {:?}", rustc);
@@ -443,7 +443,7 @@ fn discover_sysroot_src_dir_or_add_component(
) -> Result<AbsPathBuf> {
discover_sysroot_src_dir(sysroot_path)
.or_else(|| {
- let mut rustup = Command::new(toolchain::rustup());
+ let mut rustup = Command::new(Tool::Rustup.prefer_proxy());
rustup.envs(extra_env);
rustup.current_dir(current_dir).args(["component", "add", "rust-src"]);
tracing::info!("adding rust-src component by {:?}", rustup);