Add note if RUST_SRC_PATH is likely to be wrong
This commit is contained in:
parent
c1a8c03299
commit
7d0772e796
@ -90,9 +90,15 @@ impl Sysroot {
|
||||
}
|
||||
|
||||
if sysroot.by_name("core").is_none() {
|
||||
let var_note = if env::var_os("RUST_SRC_PATH").is_some() {
|
||||
" (`RUST_SRC_PATH` might be set incorrectly)"
|
||||
} else {
|
||||
""
|
||||
};
|
||||
anyhow::bail!(
|
||||
"could not find libcore in sysroot path `{}`",
|
||||
sysroot_src_dir.as_ref().display()
|
||||
"could not find libcore in sysroot path `{}`{}",
|
||||
sysroot_src_dir.as_ref().display(),
|
||||
var_note,
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user