summaryrefslogtreecommitdiff
path: root/compiler/rustc_attr/src/session_diagnostics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_attr/src/session_diagnostics.rs')
-rw-r--r--compiler/rustc_attr/src/session_diagnostics.rs60
1 files changed, 30 insertions, 30 deletions
diff --git a/compiler/rustc_attr/src/session_diagnostics.rs b/compiler/rustc_attr/src/session_diagnostics.rs
index 8362b51af40..5e8f9b79850 100644
--- a/compiler/rustc_attr/src/session_diagnostics.rs
+++ b/compiler/rustc_attr/src/session_diagnostics.rs
@@ -5,19 +5,19 @@ use rustc_errors::{
error_code, fluent, Applicability, DiagnosticBuilder, IntoDiagnostic, ErrorGuaranteed,
Handler,
};
-use rustc_macros::DiagnosticHandler;
+use rustc_macros::Diagnostic;
use rustc_span::{Span, Symbol};
use crate::UnsupportedLiteralReason;
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::expected_one_cfg_pattern, code = "E0536")]
pub(crate) struct ExpectedOneCfgPattern {
#[primary_span]
pub span: Span,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::invalid_predicate, code = "E0537")]
pub(crate) struct InvalidPredicate {
#[primary_span]
@@ -26,7 +26,7 @@ pub(crate) struct InvalidPredicate {
pub predicate: String,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::multiple_item, code = "E0538")]
pub(crate) struct MultipleItem {
#[primary_span]
@@ -35,7 +35,7 @@ pub(crate) struct MultipleItem {
pub item: String,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::incorrect_meta_item, code = "E0539")]
pub(crate) struct IncorrectMetaItem {
#[primary_span]
@@ -65,28 +65,28 @@ impl<'a> IntoDiagnostic<'a> for UnknownMetaItem<'_> {
}
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::missing_since, code = "E0542")]
pub(crate) struct MissingSince {
#[primary_span]
pub span: Span,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::missing_note, code = "E0543")]
pub(crate) struct MissingNote {
#[primary_span]
pub span: Span,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::multiple_stability_levels, code = "E0544")]
pub(crate) struct MultipleStabilityLevels {
#[primary_span]
pub span: Span,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::invalid_issue_string, code = "E0545")]
pub(crate) struct InvalidIssueString {
#[primary_span]
@@ -144,21 +144,21 @@ impl InvalidIssueStringCause {
}
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::missing_feature, code = "E0546")]
pub(crate) struct MissingFeature {
#[primary_span]
pub span: Span,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::non_ident_feature, code = "E0546")]
pub(crate) struct NonIdentFeature {
#[primary_span]
pub span: Span,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::missing_issue, code = "E0547")]
pub(crate) struct MissingIssue {
#[primary_span]
@@ -167,7 +167,7 @@ pub(crate) struct MissingIssue {
// FIXME: This diagnostic is identical to `IncorrectMetaItem`, barring the error code. Consider
// changing this to `IncorrectMetaItem`. See #51489.
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::incorrect_meta_item, code = "E0551")]
pub(crate) struct IncorrectMetaItem2 {
#[primary_span]
@@ -176,14 +176,14 @@ pub(crate) struct IncorrectMetaItem2 {
// FIXME: Why is this the same error code as `InvalidReprHintNoParen` and `InvalidReprHintNoValue`?
// It is more similar to `IncorrectReprFormatGeneric`.
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::incorrect_repr_format_packed_one_or_zero_arg, code = "E0552")]
pub(crate) struct IncorrectReprFormatPackedOneOrZeroArg {
#[primary_span]
pub span: Span,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::invalid_repr_hint_no_paren, code = "E0552")]
pub(crate) struct InvalidReprHintNoParen {
#[primary_span]
@@ -192,7 +192,7 @@ pub(crate) struct InvalidReprHintNoParen {
pub name: String,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::invalid_repr_hint_no_value, code = "E0552")]
pub(crate) struct InvalidReprHintNoValue {
#[primary_span]
@@ -237,7 +237,7 @@ impl<'a> IntoDiagnostic<'a> for UnsupportedLiteral {
}
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::invalid_repr_align_need_arg, code = "E0589")]
pub(crate) struct InvalidReprAlignNeedArg {
#[primary_span]
@@ -245,7 +245,7 @@ pub(crate) struct InvalidReprAlignNeedArg {
pub span: Span,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::invalid_repr_generic, code = "E0589")]
pub(crate) struct InvalidReprGeneric<'a> {
#[primary_span]
@@ -255,14 +255,14 @@ pub(crate) struct InvalidReprGeneric<'a> {
pub error_part: &'a str,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::incorrect_repr_format_align_one_arg, code = "E0693")]
pub(crate) struct IncorrectReprFormatAlignOneArg {
#[primary_span]
pub span: Span,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::incorrect_repr_format_generic, code = "E0693")]
pub(crate) struct IncorrectReprFormatGeneric<'a> {
#[primary_span]
@@ -317,28 +317,28 @@ impl<'a> IncorrectReprFormatGenericCause<'a> {
}
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::rustc_promotable_pairing, code = "E0717")]
pub(crate) struct RustcPromotablePairing {
#[primary_span]
pub span: Span,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::rustc_allowed_unstable_pairing, code = "E0789")]
pub(crate) struct RustcAllowedUnstablePairing {
#[primary_span]
pub span: Span,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::cfg_predicate_identifier)]
pub(crate) struct CfgPredicateIdentifier {
#[primary_span]
pub span: Span,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::deprecated_item_suggestion)]
pub(crate) struct DeprecatedItemSuggestion {
#[primary_span]
@@ -351,21 +351,21 @@ pub(crate) struct DeprecatedItemSuggestion {
pub details: (),
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::expected_single_version_literal)]
pub(crate) struct ExpectedSingleVersionLiteral {
#[primary_span]
pub span: Span,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::expected_version_literal)]
pub(crate) struct ExpectedVersionLiteral {
#[primary_span]
pub span: Span,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::expects_feature_list)]
pub(crate) struct ExpectsFeatureList {
#[primary_span]
@@ -374,7 +374,7 @@ pub(crate) struct ExpectsFeatureList {
pub name: String,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::expects_features)]
pub(crate) struct ExpectsFeatures {
#[primary_span]
@@ -383,14 +383,14 @@ pub(crate) struct ExpectsFeatures {
pub name: String,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::soft_no_args)]
pub(crate) struct SoftNoArgs {
#[primary_span]
pub span: Span,
}
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
#[diag(attr::unknown_version_literal)]
pub(crate) struct UnknownVersionLiteral {
#[primary_span]