aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/project_model
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-11 18:27:25 +0000
committerAleksey Kladov <[email protected]>2019-01-11 18:55:56 +0000
commitf60153ee9e1d598c170743633448aa3ede8cb72e (patch)
tree13803f59445d7a36e2cc82a104248b6f29597dfe /crates/ra_lsp_server/src/project_model
parent738c958a044361dc84a0f27e57b40f66a5815990 (diff)
warn louder on mising sysroot
Diffstat (limited to 'crates/ra_lsp_server/src/project_model')
-rw-r--r--crates/ra_lsp_server/src/project_model/sysroot.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/ra_lsp_server/src/project_model/sysroot.rs b/crates/ra_lsp_server/src/project_model/sysroot.rs
index 1dbab57f8..3b2fa070b 100644
--- a/crates/ra_lsp_server/src/project_model/sysroot.rs
+++ b/crates/ra_lsp_server/src/project_model/sysroot.rs
@@ -44,6 +44,14 @@ impl Sysroot {
44 let stdout = String::from_utf8(rustc_output.stdout)?; 44 let stdout = String::from_utf8(rustc_output.stdout)?;
45 let sysroot_path = Path::new(stdout.trim()); 45 let sysroot_path = Path::new(stdout.trim());
46 let src = sysroot_path.join("lib/rustlib/src/rust/src"); 46 let src = sysroot_path.join("lib/rustlib/src/rust/src");
47 if !src.exists() {
48 failure::bail!(
49 "can't load standard library from sysroot\n\
50 {:?}\n\
51 try running `rustup component add rust-src`",
52 src,
53 );
54 }
47 55
48 let mut sysroot = Sysroot { 56 let mut sysroot = Sysroot {
49 crates: Arena::default(), 57 crates: Arena::default(),