diff options
| author | bors <bors@rust-lang.org> | 2024-10-17 11:18:57 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-17 11:18:57 +0000 |
| commit | e09bf4c07af8a424f9022bfe8d42ec714a51f0be (patch) | |
| tree | 0aa83217a4da4a550ed80601e35381bb06db1c33 /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | ecf6fc5336a7fe24607b8c394f34a4fcd20079c8 (diff) | |
| parent | 6e4f8fea36cd04f623c46d99adc3c370b1879883 (diff) | |
| download | rust-e09bf4c07af8a424f9022bfe8d42ec714a51f0be.tar.gz rust-e09bf4c07af8a424f9022bfe8d42ec714a51f0be.zip | |
Auto merge of #18317 - lnicola:sync-from-rust, r=Veykril
minor: sync from downstream
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/errors.rs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/compiler/rustc_codegen_llvm/src/errors.rs b/compiler/rustc_codegen_llvm/src/errors.rs index bb481d2a308..0d436e1891e 100644 --- a/compiler/rustc_codegen_llvm/src/errors.rs +++ b/compiler/rustc_codegen_llvm/src/errors.rs @@ -80,30 +80,6 @@ impl<G: EmissionGuarantee> Diagnostic<'_, G> for ParseTargetMachineConfig<'_> { } } -pub(crate) struct TargetFeatureDisableOrEnable<'a> { - pub features: &'a [&'a str], - pub span: Option<Span>, - pub missing_features: Option<MissingFeatures>, -} - -#[derive(Subdiagnostic)] -#[help(codegen_llvm_missing_features)] -pub(crate) struct MissingFeatures; - -impl<G: EmissionGuarantee> Diagnostic<'_, G> for TargetFeatureDisableOrEnable<'_> { - fn into_diag(self, dcx: DiagCtxtHandle<'_>, level: Level) -> Diag<'_, G> { - let mut diag = Diag::new(dcx, level, fluent::codegen_llvm_target_feature_disable_or_enable); - if let Some(span) = self.span { - diag.span(span); - }; - if let Some(missing_features) = self.missing_features { - diag.subdiagnostic(missing_features); - } - diag.arg("features", self.features.join(", ")); - diag - } -} - #[derive(Diagnostic)] #[diag(codegen_llvm_lto_disallowed)] pub(crate) struct LtoDisallowed; |
