remove IntoDiagnosticArg impl for Option
This commit is contained in:
parent
1ce482adda
commit
fb488ad366
3 changed files with 2 additions and 11 deletions
|
@ -183,7 +183,7 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> {
|
|||
std::process::Command::new("ranlib").arg(output).status().expect("Couldn't run ranlib");
|
||||
|
||||
if !status.success() {
|
||||
self.config.sess.emit_fatal(RanlibFailure { exit_code: status.code() });
|
||||
self.config.sess.emit_fatal(RanlibFailure { exit_code: format!("{:?}", status.code()) });
|
||||
}
|
||||
|
||||
any_members
|
||||
|
|
|
@ -4,7 +4,7 @@ use rustc_span::Span;
|
|||
#[derive(SessionDiagnostic)]
|
||||
#[diag(codegen_gcc::ranlib_failure)]
|
||||
pub(crate) struct RanlibFailure {
|
||||
pub exit_code: Option<i32>
|
||||
pub exit_code: String,
|
||||
}
|
||||
|
||||
#[derive(SessionDiagnostic)]
|
||||
|
|
|
@ -114,15 +114,6 @@ impl IntoDiagnosticArg for char {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T: IntoDiagnosticArg> IntoDiagnosticArg for Option<T> {
|
||||
fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static> {
|
||||
match self {
|
||||
Some(t) => t.into_diagnostic_arg(),
|
||||
None => DiagnosticArgValue::Str(Cow::Borrowed("None")),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoDiagnosticArg for Symbol {
|
||||
fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static> {
|
||||
self.to_ident_string().into_diagnostic_arg()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue