diff options
| author | winstxnhdw <winstxnhdw@gmail.com> | 2024-08-09 03:44:51 +0800 |
|---|---|---|
| committer | winstxnhdw <winstxnhdw@gmail.com> | 2024-08-09 03:50:48 +0800 |
| commit | 077403a0538e45bdba438ddca1ea630ae234c09b (patch) | |
| tree | 02a69ff5308e055764e9b29312214574444b9597 | |
| parent | b086040121e3561f3e378ec55977a17a8d59d315 (diff) | |
| download | rust-077403a0538e45bdba438ddca1ea630ae234c09b.tar.gz rust-077403a0538e45bdba438ddca1ea630ae234c09b.zip | |
minor: log error when sysroot can't be discovered
| -rw-r--r-- | src/tools/rust-analyzer/crates/project-model/src/sysroot.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/rust-analyzer/crates/project-model/src/sysroot.rs b/src/tools/rust-analyzer/crates/project-model/src/sysroot.rs index bcd51930f0d..419fac3f41f 100644 --- a/src/tools/rust-analyzer/crates/project-model/src/sysroot.rs +++ b/src/tools/rust-analyzer/crates/project-model/src/sysroot.rs @@ -443,13 +443,13 @@ fn discover_sysroot_src_dir_or_add_component( get_rust_src(sysroot_path) }) .ok_or_else(|| { - format_err!( - "\ + let error = "\ 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", - ) +try installing the Rust source the same way you installed rustc"; + tracing::error!(error); + format_err!(error) }) } |
