about summary refs log tree commit diff
path: root/compiler/rustc_hir
diff options
context:
space:
mode:
authorJana Dönszelmann <jana@donsz.nl>2025-09-16 11:52:17 -0700
committerJana Dönszelmann <jana@donsz.nl>2025-09-27 19:32:14 +0200
commitb3631e1174e222bf1dadf1549cfd0f717ebf6d64 (patch)
tree10ca9f88ec5f1224947544cfd2d5ca76d09e13d1 /compiler/rustc_hir
parentade84871f718ea20a6460d28e82290353b4bf3d2 (diff)
downloadrust-b3631e1174e222bf1dadf1549cfd0f717ebf6d64.tar.gz
rust-b3631e1174e222bf1dadf1549cfd0f717ebf6d64.zip
improve empty attribute diagnostic
Diffstat (limited to 'compiler/rustc_hir')
-rw-r--r--compiler/rustc_hir/src/lints.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/compiler/rustc_hir/src/lints.rs b/compiler/rustc_hir/src/lints.rs
index b7a0a6a0c19..c9de6f6b5d5 100644
--- a/compiler/rustc_hir/src/lints.rs
+++ b/compiler/rustc_hir/src/lints.rs
@@ -31,6 +31,12 @@ pub struct AttributeLint<Id> {
 
 #[derive(Clone, Debug, HashStable_Generic)]
 pub enum AttributeLintKind {
+    /// 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>,
+    },
     UnusedDuplicate {
         this: Span,
         other: Span,
@@ -41,13 +47,8 @@ pub enum AttributeLintKind {
     },
     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>,
+        attr_path: AttrPath,
+        valid_without_list: bool,
     },
     InvalidTarget {
         name: AttrPath,