lint and remove unused diagnostic
This commit is contained in:
parent
d7bee58105
commit
6d01c6d9c8
2 changed files with 4 additions and 9 deletions
|
@ -4,13 +4,12 @@ use rustc_middle::ty::Ty;
|
||||||
use rustc_span::{Span, Symbol};
|
use rustc_span::{Span, Symbol};
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
|
||||||
struct ExitCode {
|
struct ExitCode(Option<i32>);
|
||||||
pub exit_code: Option<i32>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl IntoDiagnosticArg for ExitCode {
|
impl IntoDiagnosticArg for ExitCode {
|
||||||
fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static> {
|
fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static> {
|
||||||
match self.exit_code {
|
let ExitCode(exit_code) = self;
|
||||||
|
match exit_code {
|
||||||
Some(t) => t.into_diagnostic_arg(),
|
Some(t) => t.into_diagnostic_arg(),
|
||||||
None => DiagnosticArgValue::Str(Cow::Borrowed("None")),
|
None => DiagnosticArgValue::Str(Cow::Borrowed("None")),
|
||||||
}
|
}
|
||||||
|
@ -25,8 +24,7 @@ pub(crate) struct RanlibFailure {
|
||||||
|
|
||||||
impl RanlibFailure {
|
impl RanlibFailure {
|
||||||
pub fn new(exit_code: Option<i32>) -> Self {
|
pub fn new(exit_code: Option<i32>) -> Self {
|
||||||
let exit_code = ExitCode{ exit_code };
|
RanlibFailure { exit_code: ExitCode(exit_code) }
|
||||||
RanlibFailure { exit_code }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
codegen_gcc_ranlib_failure =
|
codegen_gcc_ranlib_failure =
|
||||||
Ranlib exited with code {$exit_code}
|
Ranlib exited with code {$exit_code}
|
||||||
|
|
||||||
codegen_gcc_layout_size_overflow =
|
|
||||||
{$error}
|
|
||||||
|
|
||||||
codegen_gcc_linkage_const_or_mut_type =
|
codegen_gcc_linkage_const_or_mut_type =
|
||||||
must have type `*const T` or `*mut T` due to `#[linkage]` attribute
|
must have type `*const T` or `*mut T` due to `#[linkage]` attribute
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue