Skip to content

Commit 7d7949b

Browse files
committed
Change recommendation when source can't be loaded from sysroot
Since we just tried running `rustup component add`, it doesn't make sense to me to recommend trying that again. If we're reaching this case, it's probably more likely that rustc was installed via package manager, in which case the source should be installed the same way (e.g. if you install the rust-src package on Ubuntu it will install a symlink in the right place to make our sysroot detection work).
1 parent ca3a54f commit 7d7949b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/project_model/src/sysroot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ fn discover_sysroot_src_dir(current_dir: &AbsPath) -> Result<AbsPathBuf> {
143143
can't load standard library from sysroot
144144
{}
145145
(discovered via `rustc --print sysroot`)
146-
try running `rustup component add rust-src` or set `RUST_SRC_PATH`",
146+
try installing the Rust source the same way you installed rustc",
147147
sysroot_path.display(),
148148
)
149149
})

0 commit comments

Comments
 (0)