diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-02-10 16:05:27 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-10 16:05:27 +0000 |
commit | 29f5e7eebf606c1929d5a77ad66624cd4f3fcf49 (patch) | |
tree | 1842c1b727febb929fe6b9fd19d67e15d7fbd59b /crates | |
parent | 5b703bdc582be427ee62d250b3d3290165c36b8c (diff) | |
parent | 5a71eb87497d053204dedf3e1960f6a8298e87c5 (diff) |
Merge #3084
3084: More specific error if `rustc --print sysroot` fails r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_project_model/src/sysroot.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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<PathBuf> { | |||
99 | let rustc_output = Command::new("rustc") | 99 | let rustc_output = Command::new("rustc") |
100 | .current_dir(cargo_toml.parent().unwrap()) | 100 | .current_dir(cargo_toml.parent().unwrap()) |
101 | .args(&["--print", "sysroot"]) | 101 | .args(&["--print", "sysroot"]) |
102 | .output()?; | 102 | .output() |
103 | .map_err(|e| format!("rustc --print sysroot failed: {}", e))?; | ||
103 | if !rustc_output.status.success() { | 104 | if !rustc_output.status.success() { |
104 | Err("failed to locate sysroot")?; | 105 | Err("failed to locate sysroot")?; |
105 | } | 106 | } |