mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Merge #3084
3084: More specific error if `rustc --print sysroot` fails r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
29f5e7eebf
1 changed files with 2 additions and 1 deletions
|
@ -99,7 +99,8 @@ fn try_find_src_path(cargo_toml: &Path) -> Result<PathBuf> {
|
|||
let rustc_output = Command::new("rustc")
|
||||
.current_dir(cargo_toml.parent().unwrap())
|
||||
.args(&["--print", "sysroot"])
|
||||
.output()?;
|
||||
.output()
|
||||
.map_err(|e| format!("rustc --print sysroot failed: {}", e))?;
|
||||
if !rustc_output.status.success() {
|
||||
Err("failed to locate sysroot")?;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue