Skip to main content

find_rust_analyzer

Function find_rust_analyzer 

Source
pub fn find_rust_analyzer() -> Result<PathBuf>
Expand description

Locates the rust-analyzer binary.

It first searches the system PATH env variable using the system which utility. If missing, it attempts to fall back to the active toolchain’s binary directory using rustup which rust-analyzer.

§Errors

Returns an error if rust-analyzer cannot be found via either mechanism, providing user-friendly instructions on how to install it.