Skip to content

Commit 6115cf6

Browse files
committed
always print nice 'std not found error' when std is not found
1 parent 378a43a commit 6115cf6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

compiler/rustc_metadata/src/errors.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use std::{
55

66
use rustc_errors::{codes::*, Diag, DiagCtxt, Diagnostic, EmissionGuarantee, Level};
77
use rustc_macros::{Diagnostic, Subdiagnostic};
8-
use rustc_session::config;
98
use rustc_span::{sym, Span, Symbol};
109
use rustc_target::spec::{PanicStrategy, TargetTriple};
1110

@@ -640,9 +639,7 @@ impl<G: EmissionGuarantee> Diagnostic<'_, G> for CannotFindCrate {
640639
diag.arg("locator_triple", self.locator_triple.triple());
641640
diag.code(E0463);
642641
diag.span(self.span);
643-
if (self.crate_name == sym::std || self.crate_name == sym::core)
644-
&& self.locator_triple != TargetTriple::from_triple(config::host_triple())
645-
{
642+
if self.crate_name == sym::std || self.crate_name == sym::core {
646643
if self.missing_core {
647644
diag.note(fluent::metadata_target_not_installed);
648645
} else {

0 commit comments

Comments
 (0)