about summary refs log tree commit diff
path: root/compiler/rustc_macros/src
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-07-06 15:56:12 +0200
committerGitHub <noreply@github.com>2025-07-06 15:56:12 +0200
commit017fe2fb8f1dc4cc1a4ffa2ea4bdfb62814a10ff (patch)
tree80a9e02d609b274c2cfcd6d5e74711ee9c96ce90 /compiler/rustc_macros/src
parentc83e217d268d25960a0c79c6941bcb3917a6a0af (diff)
parent33f2cc7eda7a97e2870f9c60a229211a5f416b7a (diff)
Rollup merge of #143252 - JonathanBrouwer:rewrite_empty_attribute, r=jdonszelmann
Rewrite empty attribute lint for new attribute parser

cc `@jdonszelmann`
Diffstat (limited to 'compiler/rustc_macros/src')
-rw-r--r--compiler/rustc_macros/src/print_attribute.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_macros/src/print_attribute.rs b/compiler/rustc_macros/src/print_attribute.rs
index 42d94e72ee9..9023520c750 100644
--- a/compiler/rustc_macros/src/print_attribute.rs
+++ b/compiler/rustc_macros/src/print_attribute.rs
@@ -21,7 +21,8 @@ fn print_fields(name: &Ident, fields: &Fields) -> (TokenStream, TokenStream, Tok
                             __p.word_space(",");
                         }
                         __p.word(#string_name);
-                        __p.word_space(":");
+                        __p.word(":");
+                        __p.nbsp();
                         __printed_anything = true;
                     }
                     #name.print_attribute(__p);