Skip to content

Commit bee4926

Browse files
committed
Auto merge of rust-lang#17836 - winstxnhdw:sysroot, r=Veykril
minor: log error when sysroot can't be discovered Closes rust-lang#17808
2 parents b086040 + 077403a commit bee4926

File tree

1 file changed

+4
-4
lines changed
  • src/tools/rust-analyzer/crates/project-model/src

1 file changed

+4
-4
lines changed

src/tools/rust-analyzer/crates/project-model/src/sysroot.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -443,13 +443,13 @@ fn discover_sysroot_src_dir_or_add_component(
443443
get_rust_src(sysroot_path)
444444
})
445445
.ok_or_else(|| {
446-
format_err!(
447-
"\
446+
let error = "\
448447
can't load standard library from sysroot
449448
{sysroot_path}
450449
(discovered via `rustc --print sysroot`)
451-
try installing the Rust source the same way you installed rustc",
452-
)
450+
try installing the Rust source the same way you installed rustc";
451+
tracing::error!(error);
452+
format_err!(error)
453453
})
454454
}
455455

0 commit comments

Comments
 (0)