about summary refs log tree commit diff
path: root/compiler/rustc_expand/src/errors.rs
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2025-09-14 06:03:22 +0200
committerLeón Orell Valerian Liehr <me@fmease.dev>2025-09-14 12:38:12 +0200
commitec7ad59789138871418362d9592b1e848bab4053 (patch)
treede6e1b7f7a895f663e2cd4b624e3dfb19c6b7b73 /compiler/rustc_expand/src/errors.rs
parent27a180a31a10bad8d5116146459a49a16b4f3866 (diff)
downloadrust-ec7ad59789138871418362d9592b1e848bab4053.tar.gz
rust-ec7ad59789138871418362d9592b1e848bab4053.zip
Move more early buffered lints to dyn lint diagnostics (4/N)
Diffstat (limited to 'compiler/rustc_expand/src/errors.rs')
-rw-r--r--compiler/rustc_expand/src/errors.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/compiler/rustc_expand/src/errors.rs b/compiler/rustc_expand/src/errors.rs
index 06c029482df..c37c2d88d9c 100644
--- a/compiler/rustc_expand/src/errors.rs
+++ b/compiler/rustc_expand/src/errors.rs
@@ -545,3 +545,31 @@ pub(crate) struct MacroCallUnusedDocComment {
     #[label]
     pub span: Span,
 }
+
+#[derive(LintDiagnostic)]
+#[diag(expand_or_patterns_back_compat)]
+pub(crate) struct OrPatternsBackCompat {
+    #[suggestion(code = "{suggestion}", applicability = "machine-applicable")]
+    pub span: Span,
+    pub suggestion: String,
+}
+
+#[derive(LintDiagnostic)]
+#[diag(expand_trailing_semi_macro)]
+pub(crate) struct TrailingMacro {
+    #[note(expand_note1)]
+    #[note(expand_note2)]
+    pub is_trailing: bool,
+    pub name: Ident,
+}
+
+#[derive(LintDiagnostic)]
+#[diag(expand_unused_builtin_attribute)]
+pub(crate) struct UnusedBuiltinAttribute {
+    #[note]
+    pub invoc_span: Span,
+    pub attr_name: Symbol,
+    pub macro_name: String,
+    #[suggestion(code = "", applicability = "machine-applicable", style = "tool-only")]
+    pub attr_span: Span,
+}