diff options
Diffstat (limited to 'compiler/rustc_metadata/src/errors.rs')
| -rw-r--r-- | compiler/rustc_metadata/src/errors.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/compiler/rustc_metadata/src/errors.rs b/compiler/rustc_metadata/src/errors.rs index b50ae057709..47d183a0440 100644 --- a/compiler/rustc_metadata/src/errors.rs +++ b/compiler/rustc_metadata/src/errors.rs @@ -4,8 +4,7 @@ use std::{ }; use rustc_errors::{codes::*, Diag, DiagCtxt, Diagnostic, EmissionGuarantee, Level}; -use rustc_macros::Diagnostic; -use rustc_session::config; +use rustc_macros::{Diagnostic, Subdiagnostic}; use rustc_span::{sym, Span, Symbol}; use rustc_target::spec::{PanicStrategy, TargetTriple}; @@ -143,8 +142,8 @@ pub struct LinkFrameworkApple { } #[derive(Diagnostic)] -#[diag(metadata_framework_only_windows, code = E0455)] -pub struct FrameworkOnlyWindows { +#[diag(metadata_raw_dylib_only_windows, code = E0455)] +pub struct RawDylibOnlyWindows { #[primary_span] pub span: Span, } @@ -640,9 +639,7 @@ impl<G: EmissionGuarantee> Diagnostic<'_, G> for CannotFindCrate { diag.arg("locator_triple", self.locator_triple.triple()); diag.code(E0463); diag.span(self.span); - if (self.crate_name == sym::std || self.crate_name == sym::core) - && self.locator_triple != TargetTriple::from_triple(config::host_triple()) - { + if self.crate_name == sym::std || self.crate_name == sym::core { if self.missing_core { diag.note(fluent::metadata_target_not_installed); } else { |
