diff options
| author | bors <bors@rust-lang.org> | 2024-03-12 05:55:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-12 05:55:19 +0000 |
| commit | 9b6a6b8f62ffd66545ea9e1858ce9e463cc72801 (patch) | |
| tree | 867759edc0e773810a18d5349733a6d4a11d3ee8 /compiler/rustc_codegen_gcc/src/errors.rs | |
| parent | 7a5b6eb9dc543cf28e1e27fa138bbf884dc56533 (diff) | |
| parent | 19378ca0969c5a105a03a2d156c10be7b58f6a66 (diff) | |
| download | rust-9b6a6b8f62ffd66545ea9e1858ce9e463cc72801.tar.gz rust-9b6a6b8f62ffd66545ea9e1858ce9e463cc72801.zip | |
Auto merge of #3375 - rust-lang:rustup-2024-03-12, r=oli-obk
Automatic Rustup
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/errors.rs')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/errors.rs | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/compiler/rustc_codegen_gcc/src/errors.rs b/compiler/rustc_codegen_gcc/src/errors.rs index 988a7e1033e..aee2b077dba 100644 --- a/compiler/rustc_codegen_gcc/src/errors.rs +++ b/compiler/rustc_codegen_gcc/src/errors.rs @@ -1,9 +1,6 @@ -use rustc_errors::{ - DiagCtxt, DiagArgValue, Diag, EmissionGuarantee, IntoDiagnostic, IntoDiagnosticArg, Level, -}; +use rustc_errors::{Diag, DiagCtxt, Diagnostic, EmissionGuarantee, Level}; use rustc_macros::{Diagnostic, Subdiagnostic}; use rustc_span::Span; -use std::borrow::Cow; use crate::fluent_generated as fluent; @@ -31,18 +28,6 @@ pub(crate) enum PossibleFeature<'a> { None, } -struct ExitCode(Option<i32>); - -impl IntoDiagnosticArg for ExitCode { - fn into_diagnostic_arg(self) -> DiagArgValue { - let ExitCode(exit_code) = self; - match exit_code { - Some(t) => t.into_diagnostic_arg(), - None => DiagArgValue::Str(Cow::Borrowed("<signal>")), - } - } -} - #[derive(Diagnostic)] #[diag(codegen_gcc_lto_not_supported)] pub(crate) struct LTONotSupported; @@ -81,12 +66,6 @@ pub(crate) struct CopyBitcode { pub(crate) struct DynamicLinkingWithLTO; #[derive(Diagnostic)] -#[diag(codegen_gcc_load_bitcode)] -pub(crate) struct LoadBitcode { - name: String, -} - -#[derive(Diagnostic)] #[diag(codegen_gcc_lto_disallowed)] pub(crate) struct LtoDisallowed; @@ -110,8 +89,8 @@ pub(crate) struct TargetFeatureDisableOrEnable<'a> { #[help(codegen_gcc_missing_features)] pub(crate) struct MissingFeatures; -impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for TargetFeatureDisableOrEnable<'_> { - fn into_diagnostic(self, dcx: &'_ DiagCtxt, level: Level) -> Diag<'_, G> { +impl<G: EmissionGuarantee> Diagnostic<'_, G> for TargetFeatureDisableOrEnable<'_> { + fn into_diag(self, dcx: &'_ DiagCtxt, level: Level) -> Diag<'_, G> { let mut diag = Diag::new(dcx, level, fluent::codegen_gcc_target_feature_disable_or_enable); if let Some(span) = self.span { diag.span(span); |
