From c2c68e3f4dcfd43aa2cbaddd8fdfe61ee086966d Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Wed, 28 Feb 2024 17:06:24 -0500 Subject: Format the code --- src/errors.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/errors.rs') diff --git a/src/errors.rs b/src/errors.rs index 79eb4406b8a..62be9e9b379 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -116,7 +116,7 @@ impl IntoDiagnostic<'_, G> for TargetFeatureDisableOrEnabl let mut diag = DiagnosticBuilder::new( dcx, level, - fluent::codegen_gcc_target_feature_disable_or_enable + fluent::codegen_gcc_target_feature_disable_or_enable, ); if let Some(span) = self.span { diag.span(span); -- cgit 1.4.1-3-g733a5 From 6f54eeb07096645c6b92fc766ffec752c770b594 Mon Sep 17 00:00:00 2001 From: r01and Date: Thu, 29 Feb 2024 23:13:09 +0800 Subject: Remove unused structs --- src/errors.rs | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'src/errors.rs') diff --git a/src/errors.rs b/src/errors.rs index 62be9e9b379..6b781f10998 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -1,10 +1,8 @@ use rustc_errors::{ - DiagCtxt, DiagnosticArgValue, DiagnosticBuilder, EmissionGuarantee, IntoDiagnostic, - IntoDiagnosticArg, Level, + DiagCtxt, DiagnosticBuilder, EmissionGuarantee, IntoDiagnostic, Level, }; use rustc_macros::{Diagnostic, Subdiagnostic}; use rustc_span::Span; -use std::borrow::Cow; use crate::fluent_generated as fluent; @@ -32,18 +30,6 @@ pub(crate) enum PossibleFeature<'a> { None, } -struct ExitCode(Option); - -impl IntoDiagnosticArg for ExitCode { - fn into_diagnostic_arg(self) -> DiagnosticArgValue { - let ExitCode(exit_code) = self; - match exit_code { - Some(t) => t.into_diagnostic_arg(), - None => DiagnosticArgValue::Str(Cow::Borrowed("")), - } - } -} - #[derive(Diagnostic)] #[diag(codegen_gcc_lto_not_supported)] pub(crate) struct LTONotSupported; @@ -81,12 +67,6 @@ pub(crate) struct CopyBitcode { #[note] 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; -- cgit 1.4.1-3-g733a5 From 1b124a9bbd3637d23f1c1a8e41fcb2594a26a077 Mon Sep 17 00:00:00 2001 From: r01and Date: Thu, 29 Feb 2024 23:26:34 +0800 Subject: Format codes --- src/errors.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/errors.rs') diff --git a/src/errors.rs b/src/errors.rs index 6b781f10998..58d74ca733b 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -1,6 +1,4 @@ -use rustc_errors::{ - DiagCtxt, DiagnosticBuilder, EmissionGuarantee, IntoDiagnostic, Level, -}; +use rustc_errors::{DiagCtxt, DiagnosticBuilder, EmissionGuarantee, IntoDiagnostic, Level}; use rustc_macros::{Diagnostic, Subdiagnostic}; use rustc_span::Span; -- cgit 1.4.1-3-g733a5