about summary refs log tree commit diff
path: root/tests/ui/proc-macro/invalid-attributes.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-07-28 02:09:05 +0000
committerbors <bors@rust-lang.org>2025-07-28 02:09:05 +0000
commit733dab558992d902d6d17576de1da768094e2cf3 (patch)
treec36891d3e7417fc84ef299b806d7601eb3d26471 /tests/ui/proc-macro/invalid-attributes.rs
parent2b5e239c6b86cde974b0ef0f8e23754fb08ff3c5 (diff)
parentd33c8f933696ab1fcdbca369d4c18f436a7faf4c (diff)
downloadrust-733dab558992d902d6d17576de1da768094e2cf3.tar.gz
rust-733dab558992d902d6d17576de1da768094e2cf3.zip
Auto merge of #144556 - matthiaskrgr:rollup-aayo3h5, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#143607 (Port the proc macro attributes to the new attribute parsing infrastructure)
 - rust-lang/rust#144471 (Remove `compiler-builtins-{no-asm,mangled-names}`)
 - rust-lang/rust#144495 (bump cargo_metadata)
 - rust-lang/rust#144523 (rustdoc: save target modifiers)
 - rust-lang/rust#144534 (check_static_item: explain should_check_for_sync choices)
 - rust-lang/rust#144535 (miri: for ABI mismatch errors, say which argument is the problem)

Failed merges:

 - rust-lang/rust#144536 (miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests/ui/proc-macro/invalid-attributes.rs')
-rw-r--r--tests/ui/proc-macro/invalid-attributes.rs24
1 files changed, 18 insertions, 6 deletions
diff --git a/tests/ui/proc-macro/invalid-attributes.rs b/tests/ui/proc-macro/invalid-attributes.rs
index a70c73e9b8f..703defad69b 100644
--- a/tests/ui/proc-macro/invalid-attributes.rs
+++ b/tests/ui/proc-macro/invalid-attributes.rs
@@ -7,20 +7,32 @@ extern crate proc_macro;
 
 use proc_macro::TokenStream;
 
-#[proc_macro = "test"] //~ ERROR malformed `proc_macro` attribute
+#[proc_macro = "test"]
+//~^ ERROR malformed `proc_macro` attribute
+//~| NOTE didn't expect any arguments here
 pub fn a(a: TokenStream) -> TokenStream { a }
 
-#[proc_macro()] //~ ERROR malformed `proc_macro` attribute
+#[proc_macro()]
+//~^ ERROR malformed `proc_macro` attribute
+//~| NOTE didn't expect any arguments here
 pub fn c(a: TokenStream) -> TokenStream { a }
 
-#[proc_macro(x)] //~ ERROR malformed `proc_macro` attribute
+#[proc_macro(x)]
+//~^ ERROR malformed `proc_macro` attribute
+//~| NOTE didn't expect any arguments here
 pub fn d(a: TokenStream) -> TokenStream { a }
 
-#[proc_macro_attribute = "test"] //~ ERROR malformed `proc_macro_attribute` attribute
+#[proc_macro_attribute = "test"]
+//~^ ERROR malformed `proc_macro_attribute` attribute
+//~| NOTE didn't expect any arguments here
 pub fn e(_: TokenStream, a: TokenStream) -> TokenStream { a }
 
-#[proc_macro_attribute()] //~ ERROR malformed `proc_macro_attribute` attribute
+#[proc_macro_attribute()]
+//~^ ERROR malformed `proc_macro_attribute` attribute
+//~| NOTE didn't expect any arguments here
 pub fn g(_: TokenStream, a: TokenStream) -> TokenStream { a }
 
-#[proc_macro_attribute(x)] //~ ERROR malformed `proc_macro_attribute` attribute
+#[proc_macro_attribute(x)]
+//~^ ERROR malformed `proc_macro_attribute` attribute
+//~| NOTE didn't expect any arguments here
 pub fn h(_: TokenStream, a: TokenStream) -> TokenStream { a }