2023-10-09 15:53:34 -04:00
|
|
|
use rustc_macros::{Diagnostic, Subdiagnostic};
|
2023-07-20 00:20:00 -04:00
|
|
|
use rustc_span::Span;
|
2022-08-31 22:02:35 -07:00
|
|
|
|
2023-10-09 15:53:34 -04:00
|
|
|
#[derive(Diagnostic)]
|
|
|
|
|
#[diag(codegen_gcc_unknown_ctarget_feature_prefix)]
|
|
|
|
|
#[note]
|
|
|
|
|
pub(crate) struct UnknownCTargetFeaturePrefix<'a> {
|
|
|
|
|
pub feature: &'a str,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Diagnostic)]
|
|
|
|
|
#[diag(codegen_gcc_unknown_ctarget_feature)]
|
|
|
|
|
#[note]
|
|
|
|
|
pub(crate) struct UnknownCTargetFeature<'a> {
|
|
|
|
|
pub feature: &'a str,
|
|
|
|
|
#[subdiagnostic]
|
|
|
|
|
pub rust_feature: PossibleFeature<'a>,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Subdiagnostic)]
|
|
|
|
|
pub(crate) enum PossibleFeature<'a> {
|
|
|
|
|
#[help(codegen_gcc_possible_feature)]
|
|
|
|
|
Some { rust_feature: &'a str },
|
|
|
|
|
#[help(codegen_gcc_consider_filing_feature_request)]
|
|
|
|
|
None,
|
|
|
|
|
}
|
|
|
|
|
|
2022-09-24 11:05:37 -07:00
|
|
|
#[derive(Diagnostic)]
|
2022-10-22 11:07:54 +02:00
|
|
|
#[diag(codegen_gcc_unwinding_inline_asm)]
|
2022-08-26 20:44:44 -07:00
|
|
|
pub(crate) struct UnwindingInlineAsm {
|
|
|
|
|
#[primary_span]
|
2022-05-28 10:43:51 +00:00
|
|
|
pub span: Span,
|
2022-08-26 20:44:44 -07:00
|
|
|
}
|
2023-03-05 12:03:19 -05:00
|
|
|
|
2023-10-09 15:53:34 -04:00
|
|
|
#[derive(Diagnostic)]
|
|
|
|
|
#[diag(codegen_gcc_copy_bitcode)]
|
|
|
|
|
pub(crate) struct CopyBitcode {
|
|
|
|
|
pub err: std::io::Error,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Diagnostic)]
|
|
|
|
|
#[diag(codegen_gcc_dynamic_linking_with_lto)]
|
|
|
|
|
#[note]
|
|
|
|
|
pub(crate) struct DynamicLinkingWithLTO;
|
|
|
|
|
|
|
|
|
|
#[derive(Diagnostic)]
|
|
|
|
|
#[diag(codegen_gcc_lto_disallowed)]
|
|
|
|
|
pub(crate) struct LtoDisallowed;
|
|
|
|
|
|
|
|
|
|
#[derive(Diagnostic)]
|
|
|
|
|
#[diag(codegen_gcc_lto_dylib)]
|
|
|
|
|
pub(crate) struct LtoDylib;
|
|
|
|
|
|
|
|
|
|
#[derive(Diagnostic)]
|
|
|
|
|
#[diag(codegen_gcc_lto_bitcode_from_rlib)]
|
|
|
|
|
pub(crate) struct LtoBitcodeFromRlib {
|
|
|
|
|
pub gcc_err: String,
|
|
|
|
|
}
|