mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-27 07:03:45 +00:00
warn louder on mising sysroot
This commit is contained in:
parent
738c958a04
commit
f60153ee9e
@ -65,7 +65,7 @@ pub fn main_loop(
|
||||
let workspaces = match ws_worker.recv().unwrap() {
|
||||
Ok(ws) => vec![ws],
|
||||
Err(e) => {
|
||||
log::warn!("loading workspace failed: {}", e);
|
||||
log::error!("loading workspace failed: {}", e);
|
||||
Vec::new()
|
||||
}
|
||||
};
|
||||
|
@ -44,6 +44,14 @@ impl Sysroot {
|
||||
let stdout = String::from_utf8(rustc_output.stdout)?;
|
||||
let sysroot_path = Path::new(stdout.trim());
|
||||
let src = sysroot_path.join("lib/rustlib/src/rust/src");
|
||||
if !src.exists() {
|
||||
failure::bail!(
|
||||
"can't load standard library from sysroot\n\
|
||||
{:?}\n\
|
||||
try running `rustup component add rust-src`",
|
||||
src,
|
||||
);
|
||||
}
|
||||
|
||||
let mut sysroot = Sysroot {
|
||||
crates: Arena::default(),
|
||||
|
Loading…
Reference in New Issue
Block a user