about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/src/errors.rs
diff options
context:
space:
mode:
authorThe Miri Cronjob Bot <miri@cron.bot>2024-03-12 05:45:33 +0000
committerThe Miri Cronjob Bot <miri@cron.bot>2024-03-12 05:45:33 +0000
commit19378ca0969c5a105a03a2d156c10be7b58f6a66 (patch)
tree867759edc0e773810a18d5349733a6d4a11d3ee8 /compiler/rustc_codegen_gcc/src/errors.rs
parent9123df0300897fdcd718f0be193ac4ca4a30aa41 (diff)
parent6b082b5e6672ed6d5fdb08d1966d15d3080f1d21 (diff)
downloadrust-19378ca0969c5a105a03a2d156c10be7b58f6a66.tar.gz
rust-19378ca0969c5a105a03a2d156c10be7b58f6a66.zip
Merge from rustc
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/errors.rs')
-rw-r--r--compiler/rustc_codegen_gcc/src/errors.rs27
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);