about summary refs log tree commit diff
diff options
context:
space:
mode:
authorantoyo <antoyo@users.noreply.github.com>2024-03-03 20:21:05 -0500
committerGitHub <noreply@github.com>2024-03-03 20:21:05 -0500
commit3937fd15b597a3c3df8828d06762f0681ccc7219 (patch)
treec69d111c4681a0ab16c8be4e5b9714e82f578b57
parent5178a8d6e814d57ecd3240f05ae10ef2fc8784da (diff)
parent7e4b53e45b71abdc1da2960beeb87765330b6340 (diff)
downloadrust-3937fd15b597a3c3df8828d06762f0681ccc7219.tar.gz
rust-3937fd15b597a3c3df8828d06762f0681ccc7219.zip
Merge pull request #460 from mu001999/patch-1
Remove unused structs
-rw-r--r--messages.ftl2
-rw-r--r--src/errors.rs24
2 files changed, 1 insertions, 25 deletions
diff --git a/messages.ftl b/messages.ftl
index 5ca0a2e1b6d..0235384445e 100644
--- a/messages.ftl
+++ b/messages.ftl
@@ -20,8 +20,6 @@ codegen_gcc_dynamic_linking_with_lto =
     cannot prefer dynamic linking when performing LTO
     .note = only 'staticlib', 'bin', and 'cdylib' outputs are supported with LTO
 
-codegen_gcc_load_bitcode = failed to load bitcode of module "{$name}"
-
 codegen_gcc_lto_disallowed = lto can only be run for executables, cdylibs and static library outputs
 
 codegen_gcc_lto_dylib = lto cannot be used for `dylib` crate type without `-Zdylib-lto`
diff --git a/src/errors.rs b/src/errors.rs
index 62be9e9b379..58d74ca733b 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -1,10 +1,6 @@
-use rustc_errors::{
-    DiagCtxt, DiagnosticArgValue, DiagnosticBuilder, EmissionGuarantee, IntoDiagnostic,
-    IntoDiagnosticArg, Level,
-};
+use rustc_errors::{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 +28,6 @@ pub(crate) enum PossibleFeature<'a> {
     None,
 }
 
-struct ExitCode(Option<i32>);
-
-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("<signal>")),
-        }
-    }
-}
-
 #[derive(Diagnostic)]
 #[diag(codegen_gcc_lto_not_supported)]
 pub(crate) struct LTONotSupported;
@@ -82,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;