From 4223760a7ba5879e11dcf93db0884367c07244d7 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 9 Jan 2020 11:25:21 +0100 Subject: Better error message closes #2775 --- crates/ra_project_model/src/sysroot.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/ra_project_model/src/sysroot.rs b/crates/ra_project_model/src/sysroot.rs index 10ca391b6..34d066b1e 100644 --- a/crates/ra_project_model/src/sysroot.rs +++ b/crates/ra_project_model/src/sysroot.rs @@ -53,9 +53,10 @@ impl Sysroot { if !src.exists() { Err(format!( "can't load standard library from sysroot\n\ - {:?}\n\ + {}\n\ + (discovered via `rustc --print sysroot`)\n\ try running `rustup component add rust-src` or set `RUST_SRC_PATH`", - src, + src.display(), ))?; } -- cgit v1.2.3