Skip to content

Commit 3937fd1

Browse files
authored
Merge pull request rust-lang#460 from mu001999/patch-1
Remove unused structs
2 parents 5178a8d + 7e4b53e commit 3937fd1

File tree

2 files changed

+1
-25
lines changed

2 files changed

+1
-25
lines changed

messages.ftl

-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ codegen_gcc_dynamic_linking_with_lto =
2020
cannot prefer dynamic linking when performing LTO
2121
.note = only 'staticlib', 'bin', and 'cdylib' outputs are supported with LTO
2222
23-
codegen_gcc_load_bitcode = failed to load bitcode of module "{$name}"
24-
2523
codegen_gcc_lto_disallowed = lto can only be run for executables, cdylibs and static library outputs
2624
2725
codegen_gcc_lto_dylib = lto cannot be used for `dylib` crate type without `-Zdylib-lto`

src/errors.rs

+1-23
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
use rustc_errors::{
2-
DiagCtxt, DiagnosticArgValue, DiagnosticBuilder, EmissionGuarantee, IntoDiagnostic,
3-
IntoDiagnosticArg, Level,
4-
};
1+
use rustc_errors::{DiagCtxt, DiagnosticBuilder, EmissionGuarantee, IntoDiagnostic, Level};
52
use rustc_macros::{Diagnostic, Subdiagnostic};
63
use rustc_span::Span;
7-
use std::borrow::Cow;
84

95
use crate::fluent_generated as fluent;
106

@@ -32,18 +28,6 @@ pub(crate) enum PossibleFeature<'a> {
3228
None,
3329
}
3430

35-
struct ExitCode(Option<i32>);
36-
37-
impl IntoDiagnosticArg for ExitCode {
38-
fn into_diagnostic_arg(self) -> DiagnosticArgValue {
39-
let ExitCode(exit_code) = self;
40-
match exit_code {
41-
Some(t) => t.into_diagnostic_arg(),
42-
None => DiagnosticArgValue::Str(Cow::Borrowed("<signal>")),
43-
}
44-
}
45-
}
46-
4731
#[derive(Diagnostic)]
4832
#[diag(codegen_gcc_lto_not_supported)]
4933
pub(crate) struct LTONotSupported;
@@ -81,12 +65,6 @@ pub(crate) struct CopyBitcode {
8165
#[note]
8266
pub(crate) struct DynamicLinkingWithLTO;
8367

84-
#[derive(Diagnostic)]
85-
#[diag(codegen_gcc_load_bitcode)]
86-
pub(crate) struct LoadBitcode {
87-
name: String,
88-
}
89-
9068
#[derive(Diagnostic)]
9169
#[diag(codegen_gcc_lto_disallowed)]
9270
pub(crate) struct LtoDisallowed;

0 commit comments

Comments
 (0)