Skip to content

Commit

Permalink
Fix missing rust-src message
Browse files Browse the repository at this point in the history
  • Loading branch information
lnicola committed Nov 24, 2024
1 parent 297db65 commit 63b82dd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/tools/rust-analyzer/crates/project-model/src/sysroot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,13 +444,14 @@ fn discover_sysroot_src_dir_or_add_component(
get_rust_src(sysroot_path)
})
.ok_or_else(|| {
let error = "\
tracing::error!(%sysroot_path, "can't load standard library, try installing `rust-src`");
format_err!(
"\
can't load standard library from sysroot
{sysroot_path}
(discovered via `rustc --print sysroot`)
try installing the Rust source the same way you installed rustc";
tracing::error!(error);
format_err!(error)
try installing `rust-src` the same way you installed `rustc`"
)
})
}

Expand Down

0 comments on commit 63b82dd

Please sign in to comment.