diff options
Diffstat (limited to 'crates/project_model/src')
-rw-r--r-- | crates/project_model/src/sysroot.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/crates/project_model/src/sysroot.rs b/crates/project_model/src/sysroot.rs index 871808d89..e529e07b0 100644 --- a/crates/project_model/src/sysroot.rs +++ b/crates/project_model/src/sysroot.rs | |||
@@ -90,9 +90,15 @@ impl Sysroot { | |||
90 | } | 90 | } |
91 | 91 | ||
92 | if sysroot.by_name("core").is_none() { | 92 | if sysroot.by_name("core").is_none() { |
93 | let var_note = if env::var_os("RUST_SRC_PATH").is_some() { | ||
94 | " (`RUST_SRC_PATH` might be incorrect, try unsetting it)" | ||
95 | } else { | ||
96 | "" | ||
97 | }; | ||
93 | anyhow::bail!( | 98 | anyhow::bail!( |
94 | "could not find libcore in sysroot path `{}`", | 99 | "could not find libcore in sysroot path `{}`{}", |
95 | sysroot_src_dir.as_ref().display() | 100 | sysroot_src_dir.as_ref().display(), |
101 | var_note, | ||
96 | ); | 102 | ); |
97 | } | 103 | } |
98 | 104 | ||