use rustc_span::{Span, Symbol};
use std::borrow::Cow;
-struct ExitCode {
- pub exit_code: Option<i32>,
-}
+struct ExitCode(Option<i32>);
impl IntoDiagnosticArg for ExitCode {
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(),
None => DiagnosticArgValue::Str(Cow::Borrowed("None")),
}
impl RanlibFailure {
pub fn new(exit_code: Option<i32>) -> Self {
- let exit_code = ExitCode{ exit_code };
- RanlibFailure { exit_code }
+ RanlibFailure { exit_code: ExitCode(exit_code) }
}
}
codegen_gcc_ranlib_failure =
Ranlib exited with code {$exit_code}
-codegen_gcc_layout_size_overflow =
- {$error}
-
codegen_gcc_linkage_const_or_mut_type =
must have type `*const T` or `*mut T` due to `#[linkage]` attribute