Auto merge of #16755 - Veykril:rustup-bins, r=Veykril

For toolchain binaries use the full path found in $PATH

Fixes https://github.com/rust-lang/rust-analyzer/issues/16754
This commit is contained in:
bors 2024-03-06 14:47:32 +00:00
commit b85d38f7d6
12 changed files with 117 additions and 131 deletions

View file

@ -189,7 +189,7 @@ fn _format(
let &crate_id = db.relevant_crates(file_id).iter().next()?;
let edition = db.crate_graph()[crate_id].edition;
let mut cmd = std::process::Command::new(toolchain::rustfmt());
let mut cmd = std::process::Command::new(toolchain::Tool::Rustfmt.path());
cmd.arg("--edition");
cmd.arg(edition.to_string());