Skip to content

Commit fb488ad

Browse files
committed
remove IntoDiagnosticArg impl for Option
1 parent 1ce482a commit fb488ad

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

compiler/rustc_codegen_gcc/src/archive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> {
183183
std::process::Command::new("ranlib").arg(output).status().expect("Couldn't run ranlib");
184184

185185
if !status.success() {
186-
self.config.sess.emit_fatal(RanlibFailure { exit_code: status.code() });
186+
self.config.sess.emit_fatal(RanlibFailure { exit_code: format!("{:?}", status.code()) });
187187
}
188188

189189
any_members

compiler/rustc_codegen_gcc/src/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use rustc_span::Span;
44
#[derive(SessionDiagnostic)]
55
#[diag(codegen_gcc::ranlib_failure)]
66
pub(crate) struct RanlibFailure {
7-
pub exit_code: Option<i32>
7+
pub exit_code: String,
88
}
99

1010
#[derive(SessionDiagnostic)]

compiler/rustc_errors/src/diagnostic.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,6 @@ impl IntoDiagnosticArg for char {
114114
}
115115
}
116116

117-
impl<T: IntoDiagnosticArg> IntoDiagnosticArg for Option<T> {
118-
fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static> {
119-
match self {
120-
Some(t) => t.into_diagnostic_arg(),
121-
None => DiagnosticArgValue::Str(Cow::Borrowed("None")),
122-
}
123-
}
124-
}
125-
126117
impl IntoDiagnosticArg for Symbol {
127118
fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static> {
128119
self.to_ident_string().into_diagnostic_arg()

0 commit comments

Comments
 (0)