Skip to content

Commit

Permalink
Merge pull request rust-lang#460 from mu001999/patch-1
Browse files Browse the repository at this point in the history
Remove unused structs
  • Loading branch information
antoyo authored Mar 4, 2024
2 parents 5178a8d + 7e4b53e commit 3937fd1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
2 changes: 0 additions & 2 deletions messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
24 changes: 1 addition & 23 deletions src/errors.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -81,12 +65,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;
Expand Down

0 comments on commit 3937fd1

Please sign in to comment.