From 5a71eb87497d053204dedf3e1960f6a8298e87c5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 10 Feb 2020 17:04:18 +0100 Subject: More specific error if `rustc --print sysroot` fails --- crates/ra_project_model/src/sysroot.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/ra_project_model') diff --git a/crates/ra_project_model/src/sysroot.rs b/crates/ra_project_model/src/sysroot.rs index 34d066b1e..a23265fc0 100644 --- a/crates/ra_project_model/src/sysroot.rs +++ b/crates/ra_project_model/src/sysroot.rs @@ -99,7 +99,8 @@ fn try_find_src_path(cargo_toml: &Path) -> Result { 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")?; } -- cgit v1.2.3