about summary refs log tree commit diff
path: root/compiler/rustc_hir/src/lints.rs
diff options
context:
space:
mode:
authorJonathan Brouwer <jonathantbrouwer@gmail.com>2025-09-21 10:20:56 -0400
committerJonathan Brouwer <jonathantbrouwer@gmail.com>2025-09-21 10:42:47 -0400
commit6abcadc235c24b0541e7bb3b6f6444d397d32f35 (patch)
treebb985e05d25fa7571fe9ca3319f3bf8b818b752d /compiler/rustc_hir/src/lints.rs
parent1d23da6b7304d9e2a2c3dcb1b0aaa709cb9bc4ad (diff)
downloadrust-6abcadc235c24b0541e7bb3b6f6444d397d32f35.tar.gz
rust-6abcadc235c24b0541e7bb3b6f6444d397d32f35.zip
Port #[macro_export] to the new attribute parsing infrastructure
Co-authored-by: Anne Stijns <anstijns@gmail.com>
Diffstat (limited to 'compiler/rustc_hir/src/lints.rs')
-rw-r--r--compiler/rustc_hir/src/lints.rs35
1 files changed, 30 insertions, 5 deletions
diff --git a/compiler/rustc_hir/src/lints.rs b/compiler/rustc_hir/src/lints.rs
index 0b24052b453..b7a0a6a0c19 100644
--- a/compiler/rustc_hir/src/lints.rs
+++ b/compiler/rustc_hir/src/lints.rs
@@ -31,9 +31,34 @@ pub struct AttributeLint<Id> {
 
 #[derive(Clone, Debug, HashStable_Generic)]
 pub enum AttributeLintKind {
-    UnusedDuplicate { this: Span, other: Span, warning: bool },
-    IllFormedAttributeInput { suggestions: Vec<String> },
-    EmptyAttribute { first_span: Span },
-    InvalidTarget { name: AttrPath, target: Target, applied: Vec<String>, only: &'static str },
-    InvalidStyle { name: AttrPath, is_used_as_inner: bool, target: Target, target_span: Span },
+    UnusedDuplicate {
+        this: Span,
+        other: Span,
+        warning: bool,
+    },
+    IllFormedAttributeInput {
+        suggestions: Vec<String>,
+    },
+    EmptyAttribute {
+        first_span: Span,
+    },
+
+    /// Copy of `IllFormedAttributeInput`
+    /// specifically for the `invalid_macro_export_arguments` lint until that is removed,
+    /// see <https://github.com/rust-lang/rust/pull/143857#issuecomment-3079175663>
+    InvalidMacroExportArguments {
+        suggestions: Vec<String>,
+    },
+    InvalidTarget {
+        name: AttrPath,
+        target: Target,
+        applied: Vec<String>,
+        only: &'static str,
+    },
+    InvalidStyle {
+        name: AttrPath,
+        is_used_as_inner: bool,
+        target: Target,
+        target_span: Span,
+    },
 }