Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #17836 - winstxnhdw:sysroot, r=Veykril
minor: log error when sysroot can't be discovered
Closes #17808
| -rw-r--r-- | crates/project-model/src/sysroot.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/project-model/src/sysroot.rs b/crates/project-model/src/sysroot.rs index bcd51930f0..419fac3f41 100644 --- a/crates/project-model/src/sysroot.rs +++ b/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) }) } |