about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJonathan Brouwer <jonathantbrouwer@gmail.com>2025-07-12 17:34:43 +0200
committerJonathan Brouwer <jonathantbrouwer@gmail.com>2025-07-23 13:33:23 +0200
commit3303534dc8825258f8a5d3a1b1e4572d55cccd9a (patch)
treeb0b68efe9eeaba7f7b743aa0dd7e5d60f813ff8a
parenta460b46d0f7d95a0a07bad444606f6fd53aea62c (diff)
downloadrust-3303534dc8825258f8a5d3a1b1e4572d55cccd9a.tar.gz
rust-3303534dc8825258f8a5d3a1b1e4572d55cccd9a.zip
Update uitest stderrs
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0466.md4
-rw-r--r--tests/pretty/hir-delegation.pp2
-rw-r--r--tests/pretty/hir-fn-params.pp2
-rw-r--r--tests/pretty/hir-fn-variadic.pp2
-rw-r--r--tests/pretty/hir-if-else.pp2
-rw-r--r--tests/pretty/hir-lifetimes.pp2
-rw-r--r--tests/pretty/hir-pretty-attr.pp2
-rw-r--r--tests/pretty/hir-pretty-loop.pp2
-rw-r--r--tests/pretty/hir-struct-expr.pp2
-rw-r--r--tests/pretty/issue-4264.pp2
-rw-r--r--tests/pretty/issue-85089.pp2
-rw-r--r--tests/pretty/pin-ergonomics-hir.pp2
-rw-r--r--tests/ui/attributes/invalid-macro-use.rs53
-rw-r--r--tests/ui/attributes/invalid-macro-use.stderr131
-rw-r--r--tests/ui/attributes/malformed-attrs.rs2
-rw-r--r--tests/ui/attributes/malformed-attrs.stderr21
-rw-r--r--tests/ui/feature-gates/issue-43106-gating-of-macro_use.rs2
-rw-r--r--tests/ui/feature-gates/issue-43106-gating-of-macro_use.stderr11
-rw-r--r--tests/ui/lint/unused/unused-attr-duplicate.stderr24
-rw-r--r--tests/ui/lint/unused/unused-attr-macro-rules.stderr16
-rw-r--r--tests/ui/macros/genercs-in-path-with-prettry-hir.stdout2
-rw-r--r--tests/ui/macros/macro-use-all-and-none.stderr5
-rw-r--r--tests/ui/macros/macro-use-bad-args-1.rs2
-rw-r--r--tests/ui/macros/macro-use-bad-args-1.stderr19
-rw-r--r--tests/ui/macros/macro-use-bad-args-2.rs2
-rw-r--r--tests/ui/macros/macro-use-bad-args-2.stderr19
-rw-r--r--tests/ui/match/issue-82392.stdout2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-60662.stdout2
-rw-r--r--tests/ui/unpretty/bad-literal.stdout2
-rw-r--r--tests/ui/unpretty/debug-fmt-hir.stdout2
-rw-r--r--tests/ui/unpretty/deprecated-attr.stdout2
-rw-r--r--tests/ui/unpretty/diagnostic-attr.stdout2
-rw-r--r--tests/ui/unpretty/exhaustive-asm.hir.stdout2
-rw-r--r--tests/ui/unpretty/exhaustive.hir.stdout2
-rw-r--r--tests/ui/unpretty/flattened-format-args.stdout2
-rw-r--r--tests/ui/unpretty/let-else-hir.stdout2
-rw-r--r--tests/ui/unpretty/self-hir.stdout2
-rw-r--r--tests/ui/unpretty/unpretty-expr-fn-arg.stdout2
38 files changed, 274 insertions, 85 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0466.md b/compiler/rustc_error_codes/src/error_codes/E0466.md
index 7aefedbc087..28016eb395e 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0466.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0466.md
@@ -1,8 +1,10 @@
+#### Note: this error code is no longer emitted by the compiler.
+
 Macro import declaration was malformed.
 
 Erroneous code examples:
 
-```compile_fail,E0466
+```compile_fail
 #[macro_use(a_macro(another_macro))] // error: invalid import declaration
 extern crate core as some_crate;
 
diff --git a/tests/pretty/hir-delegation.pp b/tests/pretty/hir-delegation.pp
index e452cee6365..c0d724cccb5 100644
--- a/tests/pretty/hir-delegation.pp
+++ b/tests/pretty/hir-delegation.pp
@@ -6,7 +6,7 @@
 #![feature(fn_delegation)]
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 
 fn b<C>(e: C) { }
diff --git a/tests/pretty/hir-fn-params.pp b/tests/pretty/hir-fn-params.pp
index 3799c8a3c3b..cfb33cc93eb 100644
--- a/tests/pretty/hir-fn-params.pp
+++ b/tests/pretty/hir-fn-params.pp
@@ -1,6 +1,6 @@
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 //@ pretty-compare-only
 //@ pretty-mode:hir
diff --git a/tests/pretty/hir-fn-variadic.pp b/tests/pretty/hir-fn-variadic.pp
index b6bc8e95127..99919e7fc6b 100644
--- a/tests/pretty/hir-fn-variadic.pp
+++ b/tests/pretty/hir-fn-variadic.pp
@@ -5,7 +5,7 @@
 #![feature(c_variadic)]
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 
 extern "C" {
diff --git a/tests/pretty/hir-if-else.pp b/tests/pretty/hir-if-else.pp
index 200e34ac4f5..4bccde663eb 100644
--- a/tests/pretty/hir-if-else.pp
+++ b/tests/pretty/hir-if-else.pp
@@ -1,6 +1,6 @@
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 //@ pretty-compare-only
 //@ pretty-mode:hir
diff --git a/tests/pretty/hir-lifetimes.pp b/tests/pretty/hir-lifetimes.pp
index 58de6d81915..1bb2f17cdfb 100644
--- a/tests/pretty/hir-lifetimes.pp
+++ b/tests/pretty/hir-lifetimes.pp
@@ -7,7 +7,7 @@
 #![allow(unused)]
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 
 struct Foo<'a> {
diff --git a/tests/pretty/hir-pretty-attr.pp b/tests/pretty/hir-pretty-attr.pp
index db7489c1264..c780f8e3639 100644
--- a/tests/pretty/hir-pretty-attr.pp
+++ b/tests/pretty/hir-pretty-attr.pp
@@ -1,6 +1,6 @@
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 //@ pretty-compare-only
 //@ pretty-mode:hir
diff --git a/tests/pretty/hir-pretty-loop.pp b/tests/pretty/hir-pretty-loop.pp
index 15f1677885a..c07120273c9 100644
--- a/tests/pretty/hir-pretty-loop.pp
+++ b/tests/pretty/hir-pretty-loop.pp
@@ -1,6 +1,6 @@
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 //@ pretty-compare-only
 //@ pretty-mode:hir
diff --git a/tests/pretty/hir-struct-expr.pp b/tests/pretty/hir-struct-expr.pp
index f85d17542df..177eb5e8631 100644
--- a/tests/pretty/hir-struct-expr.pp
+++ b/tests/pretty/hir-struct-expr.pp
@@ -1,6 +1,6 @@
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 //@ pretty-compare-only
 //@ pretty-mode:hir
diff --git a/tests/pretty/issue-4264.pp b/tests/pretty/issue-4264.pp
index eb808f7122a..f4b641335d1 100644
--- a/tests/pretty/issue-4264.pp
+++ b/tests/pretty/issue-4264.pp
@@ -1,6 +1,6 @@
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 //@ pretty-compare-only
 //@ pretty-mode:hir,typed
diff --git a/tests/pretty/issue-85089.pp b/tests/pretty/issue-85089.pp
index f4e0eb3dd5f..31c0f90bf27 100644
--- a/tests/pretty/issue-85089.pp
+++ b/tests/pretty/issue-85089.pp
@@ -1,6 +1,6 @@
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 // Test to print lifetimes on HIR pretty-printing.
 
diff --git a/tests/pretty/pin-ergonomics-hir.pp b/tests/pretty/pin-ergonomics-hir.pp
index 212e0e174da..58a1c62f712 100644
--- a/tests/pretty/pin-ergonomics-hir.pp
+++ b/tests/pretty/pin-ergonomics-hir.pp
@@ -6,7 +6,7 @@
 #![allow(dead_code, incomplete_features)]
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 
 use std::pin::Pin;
diff --git a/tests/ui/attributes/invalid-macro-use.rs b/tests/ui/attributes/invalid-macro-use.rs
new file mode 100644
index 00000000000..cfb13fd183c
--- /dev/null
+++ b/tests/ui/attributes/invalid-macro-use.rs
@@ -0,0 +1,53 @@
+#![deny(unused_attributes)]
+//~^ NOTE the lint level is defined here
+
+#[macro_use = 5]
+//~^ ERROR valid forms for the attribute are `#[macro_use(name1, name2, ...)]` and `#[macro_use]`
+extern crate std as s1;
+
+#[macro_use(5)]
+//~^ ERROR malformed `macro_use` attribute input
+//~| NOTE expected a valid identifier here
+extern crate std as s2;
+
+#[macro_use(a = "b")]
+//~^ ERROR malformed `macro_use` attribute input
+//~| NOTE didn't expect any arguments here
+extern crate std as s3;
+
+#[macro_use(a(b))]
+//~^ ERROR malformed `macro_use` attribute input
+//~| NOTE didn't expect any arguments here
+extern crate std as s4;
+
+#[macro_use(a::b)]
+//~^ ERROR malformed `macro_use` attribute input
+//~| NOTE expected a valid identifier here
+extern crate std as s5;
+
+#[macro_use(a)]
+//~^ ERROR unused attribute
+#[macro_use]
+//~^ NOTE attribute also specified here
+extern crate std as s6;
+
+#[macro_use]
+//~^ NOTE attribute also specified here
+#[macro_use(a)]
+//~^ ERROR unused attribute
+extern crate std as s7;
+
+#[macro_use]
+//~^ NOTE attribute also specified here
+#[macro_use]
+//~^ ERROR unused attribute
+extern crate std as s8;
+
+// This is fine, both are importing different names
+#[macro_use(a)]
+//~^ ERROR imported macro not found
+#[macro_use(b)]
+//~^ ERROR imported macro not found
+extern crate std as s9;
+
+fn main() {}
diff --git a/tests/ui/attributes/invalid-macro-use.stderr b/tests/ui/attributes/invalid-macro-use.stderr
new file mode 100644
index 00000000000..4f5db5c558a
--- /dev/null
+++ b/tests/ui/attributes/invalid-macro-use.stderr
@@ -0,0 +1,131 @@
+error[E0469]: imported macro not found
+  --> $DIR/invalid-macro-use.rs:47:13
+   |
+LL | #[macro_use(a)]
+   |             ^
+
+error[E0469]: imported macro not found
+  --> $DIR/invalid-macro-use.rs:49:13
+   |
+LL | #[macro_use(b)]
+   |             ^
+
+error: valid forms for the attribute are `#[macro_use(name1, name2, ...)]` and `#[macro_use]`
+  --> $DIR/invalid-macro-use.rs:4:1
+   |
+LL | #[macro_use = 5]
+   | ^^^^^^^^^^^^^^^^
+
+error[E0539]: malformed `macro_use` attribute input
+  --> $DIR/invalid-macro-use.rs:8:1
+   |
+LL | #[macro_use(5)]
+   | ^^^^^^^^^^^^-^^
+   |             |
+   |             expected a valid identifier here
+   |
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[macro_use(5)]
+LL + #[macro_use(name1, name2, ...)]
+   |
+LL - #[macro_use(5)]
+LL + #[macro_use]
+   |
+
+error[E0565]: malformed `macro_use` attribute input
+  --> $DIR/invalid-macro-use.rs:13:1
+   |
+LL | #[macro_use(a = "b")]
+   | ^^^^^^^^^^^^^^-----^^
+   |               |
+   |               didn't expect any arguments here
+   |
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[macro_use(a = "b")]
+LL + #[macro_use(name1, name2, ...)]
+   |
+LL - #[macro_use(a = "b")]
+LL + #[macro_use]
+   |
+
+error[E0565]: malformed `macro_use` attribute input
+  --> $DIR/invalid-macro-use.rs:18:1
+   |
+LL | #[macro_use(a(b))]
+   | ^^^^^^^^^^^^^---^^
+   |              |
+   |              didn't expect any arguments here
+   |
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[macro_use(a(b))]
+LL + #[macro_use(name1, name2, ...)]
+   |
+LL - #[macro_use(a(b))]
+LL + #[macro_use]
+   |
+
+error[E0539]: malformed `macro_use` attribute input
+  --> $DIR/invalid-macro-use.rs:23:1
+   |
+LL | #[macro_use(a::b)]
+   | ^^^^^^^^^^^^----^^
+   |             |
+   |             expected a valid identifier here
+   |
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[macro_use(a::b)]
+LL + #[macro_use(name1, name2, ...)]
+   |
+LL - #[macro_use(a::b)]
+LL + #[macro_use]
+   |
+
+error: unused attribute
+  --> $DIR/invalid-macro-use.rs:28:1
+   |
+LL | #[macro_use(a)]
+   | ^^^^^^^^^^^^^^^ help: remove this attribute
+   |
+note: attribute also specified here
+  --> $DIR/invalid-macro-use.rs:30:1
+   |
+LL | #[macro_use]
+   | ^^^^^^^^^^^^
+note: the lint level is defined here
+  --> $DIR/invalid-macro-use.rs:1:9
+   |
+LL | #![deny(unused_attributes)]
+   |         ^^^^^^^^^^^^^^^^^
+
+error: unused attribute
+  --> $DIR/invalid-macro-use.rs:36:1
+   |
+LL | #[macro_use(a)]
+   | ^^^^^^^^^^^^^^^ help: remove this attribute
+   |
+note: attribute also specified here
+  --> $DIR/invalid-macro-use.rs:34:1
+   |
+LL | #[macro_use]
+   | ^^^^^^^^^^^^
+
+error: unused attribute
+  --> $DIR/invalid-macro-use.rs:42:1
+   |
+LL | #[macro_use]
+   | ^^^^^^^^^^^^ help: remove this attribute
+   |
+note: attribute also specified here
+  --> $DIR/invalid-macro-use.rs:40:1
+   |
+LL | #[macro_use]
+   | ^^^^^^^^^^^^
+
+error: aborting due to 10 previous errors
+
+Some errors have detailed explanations: E0469, E0539, E0565.
+For more information about an error, try `rustc --explain E0469`.
diff --git a/tests/ui/attributes/malformed-attrs.rs b/tests/ui/attributes/malformed-attrs.rs
index d4c6ecaa189..2a8b7b41e58 100644
--- a/tests/ui/attributes/malformed-attrs.rs
+++ b/tests/ui/attributes/malformed-attrs.rs
@@ -208,7 +208,7 @@ static mut TLS: u8 = 42;
 #[no_link()]
 //~^ ERROR malformed
 #[macro_use = 1]
-//~^ ERROR malformed
+//~^ ERROR valid forms for the attribute are `#[macro_use(name1, name2, ...)]` and `#[macro_use]`
 extern crate wloop;
 //~^ ERROR can't find crate for `wloop` [E0463]
 
diff --git a/tests/ui/attributes/malformed-attrs.stderr b/tests/ui/attributes/malformed-attrs.stderr
index de53af851a3..7ae24db8b5f 100644
--- a/tests/ui/attributes/malformed-attrs.stderr
+++ b/tests/ui/attributes/malformed-attrs.stderr
@@ -154,21 +154,6 @@ error: malformed `no_link` attribute input
 LL | #[no_link()]
    | ^^^^^^^^^^^^ help: must be of the form: `#[no_link]`
 
-error: malformed `macro_use` attribute input
-  --> $DIR/malformed-attrs.rs:210:1
-   |
-LL | #[macro_use = 1]
-   | ^^^^^^^^^^^^^^^^
-   |
-help: the following are the possible correct uses
-   |
-LL - #[macro_use = 1]
-LL + #[macro_use(name1, name2, ...)]
-   |
-LL - #[macro_use = 1]
-LL + #[macro_use]
-   |
-
 error: malformed `macro_export` attribute input
   --> $DIR/malformed-attrs.rs:215:1
    |
@@ -567,6 +552,12 @@ LL | #[non_exhaustive = 1]
    | |                didn't expect any arguments here
    | help: must be of the form: `#[non_exhaustive]`
 
+error: valid forms for the attribute are `#[macro_use(name1, name2, ...)]` and `#[macro_use]`
+  --> $DIR/malformed-attrs.rs:210:1
+   |
+LL | #[macro_use = 1]
+   | ^^^^^^^^^^^^^^^^
+
 error[E0565]: malformed `type_const` attribute input
   --> $DIR/malformed-attrs.rs:144:5
    |
diff --git a/tests/ui/feature-gates/issue-43106-gating-of-macro_use.rs b/tests/ui/feature-gates/issue-43106-gating-of-macro_use.rs
index 6a7ef793924..0438152ff35 100644
--- a/tests/ui/feature-gates/issue-43106-gating-of-macro_use.rs
+++ b/tests/ui/feature-gates/issue-43106-gating-of-macro_use.rs
@@ -13,7 +13,7 @@ mod macro_escape {
     //~^ ERROR arguments to `macro_use` are not allowed here
 
     #[macro_use = "2700"] struct S;
-    //~^ ERROR malformed `macro_use` attribute
+    //~^ ERROR valid forms for the attribute are `#[macro_use(name1, name2, ...)]` and `#[macro_use]`
 
     #[macro_use] fn f() { }
 
diff --git a/tests/ui/feature-gates/issue-43106-gating-of-macro_use.stderr b/tests/ui/feature-gates/issue-43106-gating-of-macro_use.stderr
index 8987b87f84e..4da71766837 100644
--- a/tests/ui/feature-gates/issue-43106-gating-of-macro_use.stderr
+++ b/tests/ui/feature-gates/issue-43106-gating-of-macro_use.stderr
@@ -16,20 +16,11 @@ error: arguments to `macro_use` are not allowed here
 LL | #![macro_use(my_macro)]
    | ^^^^^^^^^^^^^^^^^^^^^^^
 
-error: malformed `macro_use` attribute input
+error: valid forms for the attribute are `#[macro_use(name1, name2, ...)]` and `#[macro_use]`
   --> $DIR/issue-43106-gating-of-macro_use.rs:15:5
    |
 LL |     #[macro_use = "2700"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^
-   |
-help: the following are the possible correct uses
-   |
-LL -     #[macro_use = "2700"] struct S;
-LL +     #[macro_use(name1, name2, ...)] struct S;
-   |
-LL -     #[macro_use = "2700"] struct S;
-LL +     #[macro_use] struct S;
-   |
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/lint/unused/unused-attr-duplicate.stderr b/tests/ui/lint/unused/unused-attr-duplicate.stderr
index ecc1b7ff5a4..e277f5203c6 100644
--- a/tests/ui/lint/unused/unused-attr-duplicate.stderr
+++ b/tests/ui/lint/unused/unused-attr-duplicate.stderr
@@ -16,18 +16,6 @@ LL | #![deny(unused_attributes)]
    |         ^^^^^^^^^^^^^^^^^
 
 error: unused attribute
-  --> $DIR/unused-attr-duplicate.rs:37:1
-   |
-LL | #[macro_use]
-   | ^^^^^^^^^^^^ help: remove this attribute
-   |
-note: attribute also specified here
-  --> $DIR/unused-attr-duplicate.rs:36:1
-   |
-LL | #[macro_use]
-   | ^^^^^^^^^^^^
-
-error: unused attribute
   --> $DIR/unused-attr-duplicate.rs:55:1
    |
 LL | #[should_panic(expected = "values don't match")]
@@ -129,6 +117,18 @@ LL |     #[macro_export]
    |     ^^^^^^^^^^^^^^^
 
 error: unused attribute
+  --> $DIR/unused-attr-duplicate.rs:37:1
+   |
+LL | #[macro_use]
+   | ^^^^^^^^^^^^ help: remove this attribute
+   |
+note: attribute also specified here
+  --> $DIR/unused-attr-duplicate.rs:36:1
+   |
+LL | #[macro_use]
+   | ^^^^^^^^^^^^
+
+error: unused attribute
   --> $DIR/unused-attr-duplicate.rs:47:1
    |
 LL | #[path = "bar.rs"]
diff --git a/tests/ui/lint/unused/unused-attr-macro-rules.stderr b/tests/ui/lint/unused/unused-attr-macro-rules.stderr
index 4698e381425..1e1211af5e2 100644
--- a/tests/ui/lint/unused/unused-attr-macro-rules.stderr
+++ b/tests/ui/lint/unused/unused-attr-macro-rules.stderr
@@ -1,8 +1,8 @@
-error: `#[macro_use]` only has an effect on `extern crate` and modules
-  --> $DIR/unused-attr-macro-rules.rs:7:1
+error: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
+  --> $DIR/unused-attr-macro-rules.rs:9:1
    |
-LL | #[macro_use]
-   | ^^^^^^^^^^^^
+LL | #[recursion_limit="1"]
+   | ^^^^^^^^^^^^^^^^^^^^^^
    |
 note: the lint level is defined here
   --> $DIR/unused-attr-macro-rules.rs:1:9
@@ -10,11 +10,11 @@ note: the lint level is defined here
 LL | #![deny(unused_attributes)]
    |         ^^^^^^^^^^^^^^^^^
 
-error: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/unused-attr-macro-rules.rs:9:1
+error: `#[macro_use]` only has an effect on `extern crate` and modules
+  --> $DIR/unused-attr-macro-rules.rs:7:1
    |
-LL | #[recursion_limit="1"]
-   | ^^^^^^^^^^^^^^^^^^^^^^
+LL | #[macro_use]
+   | ^^^^^^^^^^^^
 
 error: `#[path]` only has an effect on modules
   --> $DIR/unused-attr-macro-rules.rs:8:1
diff --git a/tests/ui/macros/genercs-in-path-with-prettry-hir.stdout b/tests/ui/macros/genercs-in-path-with-prettry-hir.stdout
index 7c41225f95e..6b0300132b5 100644
--- a/tests/ui/macros/genercs-in-path-with-prettry-hir.stdout
+++ b/tests/ui/macros/genercs-in-path-with-prettry-hir.stdout
@@ -1,6 +1,6 @@
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 //@ compile-flags: -Zunpretty=hir
 //@ edition: 2015
diff --git a/tests/ui/macros/macro-use-all-and-none.stderr b/tests/ui/macros/macro-use-all-and-none.stderr
index 00b10dccd00..a5efb065a21 100644
--- a/tests/ui/macros/macro-use-all-and-none.stderr
+++ b/tests/ui/macros/macro-use-all-and-none.stderr
@@ -1,10 +1,9 @@
 warning: unused attribute
-  --> $DIR/macro-use-all-and-none.rs:7:1
+  --> $DIR/macro-use-all-and-none.rs:7:12
    |
 LL | #[macro_use()]
-   | ^^^^^^^^^^^^^^ help: remove this attribute
+   |            ^^ help: remove this attribute
    |
-   = note: attribute `macro_use` with an empty list has no effect
 note: the lint level is defined here
   --> $DIR/macro-use-all-and-none.rs:4:9
    |
diff --git a/tests/ui/macros/macro-use-bad-args-1.rs b/tests/ui/macros/macro-use-bad-args-1.rs
index ec0b64a1095..bfc19981804 100644
--- a/tests/ui/macros/macro-use-bad-args-1.rs
+++ b/tests/ui/macros/macro-use-bad-args-1.rs
@@ -1,6 +1,6 @@
 #![no_std]
 
-#[macro_use(foo(bar))]  //~ ERROR bad macro import
+#[macro_use(foo(bar))]  //~ ERROR malformed `macro_use` attribute input
 extern crate std;
 
 fn main() {}
diff --git a/tests/ui/macros/macro-use-bad-args-1.stderr b/tests/ui/macros/macro-use-bad-args-1.stderr
index 6d2f159a574..2f43d0997df 100644
--- a/tests/ui/macros/macro-use-bad-args-1.stderr
+++ b/tests/ui/macros/macro-use-bad-args-1.stderr
@@ -1,9 +1,20 @@
-error[E0466]: bad macro import
-  --> $DIR/macro-use-bad-args-1.rs:3:13
+error[E0565]: malformed `macro_use` attribute input
+  --> $DIR/macro-use-bad-args-1.rs:3:1
    |
 LL | #[macro_use(foo(bar))]
-   |             ^^^^^^^^
+   | ^^^^^^^^^^^^^^^-----^^
+   |                |
+   |                didn't expect any arguments here
+   |
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[macro_use(foo(bar))]
+LL + #[macro_use(name1, name2, ...)]
+   |
+LL - #[macro_use(foo(bar))]
+LL + #[macro_use]
+   |
 
 error: aborting due to 1 previous error
 
-For more information about this error, try `rustc --explain E0466`.
+For more information about this error, try `rustc --explain E0565`.
diff --git a/tests/ui/macros/macro-use-bad-args-2.rs b/tests/ui/macros/macro-use-bad-args-2.rs
index c5f8f62c186..e328b6285d9 100644
--- a/tests/ui/macros/macro-use-bad-args-2.rs
+++ b/tests/ui/macros/macro-use-bad-args-2.rs
@@ -1,6 +1,6 @@
 #![no_std]
 
-#[macro_use(foo="bar")]  //~ ERROR bad macro import
+#[macro_use(foo="bar")]  //~ ERROR malformed `macro_use` attribute input
 extern crate std;
 
 fn main() {}
diff --git a/tests/ui/macros/macro-use-bad-args-2.stderr b/tests/ui/macros/macro-use-bad-args-2.stderr
index 364f3da6e15..d7b03c93588 100644
--- a/tests/ui/macros/macro-use-bad-args-2.stderr
+++ b/tests/ui/macros/macro-use-bad-args-2.stderr
@@ -1,9 +1,20 @@
-error[E0466]: bad macro import
-  --> $DIR/macro-use-bad-args-2.rs:3:13
+error[E0565]: malformed `macro_use` attribute input
+  --> $DIR/macro-use-bad-args-2.rs:3:1
    |
 LL | #[macro_use(foo="bar")]
-   |             ^^^^^^^^^
+   | ^^^^^^^^^^^^^^^------^^
+   |                |
+   |                didn't expect any arguments here
+   |
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[macro_use(foo="bar")]
+LL + #[macro_use(name1, name2, ...)]
+   |
+LL - #[macro_use(foo="bar")]
+LL + #[macro_use]
+   |
 
 error: aborting due to 1 previous error
 
-For more information about this error, try `rustc --explain E0466`.
+For more information about this error, try `rustc --explain E0565`.
diff --git a/tests/ui/match/issue-82392.stdout b/tests/ui/match/issue-82392.stdout
index a0d83d962e7..3efc964e053 100644
--- a/tests/ui/match/issue-82392.stdout
+++ b/tests/ui/match/issue-82392.stdout
@@ -1,6 +1,6 @@
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 // https://github.com/rust-lang/rust/issues/82329
 //@ compile-flags: -Zunpretty=hir,typed
diff --git a/tests/ui/type-alias-impl-trait/issue-60662.stdout b/tests/ui/type-alias-impl-trait/issue-60662.stdout
index 56fef852e37..52152a73aff 100644
--- a/tests/ui/type-alias-impl-trait/issue-60662.stdout
+++ b/tests/ui/type-alias-impl-trait/issue-60662.stdout
@@ -5,7 +5,7 @@
 #![feature(type_alias_impl_trait)]
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 
 trait Animal { }
diff --git a/tests/ui/unpretty/bad-literal.stdout b/tests/ui/unpretty/bad-literal.stdout
index 06116a4ab55..ba8467359cd 100644
--- a/tests/ui/unpretty/bad-literal.stdout
+++ b/tests/ui/unpretty/bad-literal.stdout
@@ -1,6 +1,6 @@
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 //@ compile-flags: -Zunpretty=hir
 //@ check-fail
diff --git a/tests/ui/unpretty/debug-fmt-hir.stdout b/tests/ui/unpretty/debug-fmt-hir.stdout
index dc18675ea80..1d224c9e91f 100644
--- a/tests/ui/unpretty/debug-fmt-hir.stdout
+++ b/tests/ui/unpretty/debug-fmt-hir.stdout
@@ -1,6 +1,6 @@
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 //@ compile-flags: -Zunpretty=hir
 //@ check-pass
diff --git a/tests/ui/unpretty/deprecated-attr.stdout b/tests/ui/unpretty/deprecated-attr.stdout
index 042c2f61bd4..0abeef6f61e 100644
--- a/tests/ui/unpretty/deprecated-attr.stdout
+++ b/tests/ui/unpretty/deprecated-attr.stdout
@@ -1,6 +1,6 @@
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 //@ compile-flags: -Zunpretty=hir
 //@ check-pass
diff --git a/tests/ui/unpretty/diagnostic-attr.stdout b/tests/ui/unpretty/diagnostic-attr.stdout
index 3b15a845d68..a1325c61ca7 100644
--- a/tests/ui/unpretty/diagnostic-attr.stdout
+++ b/tests/ui/unpretty/diagnostic-attr.stdout
@@ -1,6 +1,6 @@
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 //@ compile-flags: -Zunpretty=hir
 //@ check-pass
diff --git a/tests/ui/unpretty/exhaustive-asm.hir.stdout b/tests/ui/unpretty/exhaustive-asm.hir.stdout
index ec9bda57331..bbd846a8845 100644
--- a/tests/ui/unpretty/exhaustive-asm.hir.stdout
+++ b/tests/ui/unpretty/exhaustive-asm.hir.stdout
@@ -1,6 +1,6 @@
 #[prelude_import]
 use std::prelude::rust_2024::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 //@ revisions: expanded hir
 //@[expanded]compile-flags: -Zunpretty=expanded
diff --git a/tests/ui/unpretty/exhaustive.hir.stdout b/tests/ui/unpretty/exhaustive.hir.stdout
index a559d51ed5d..77807728c9d 100644
--- a/tests/ui/unpretty/exhaustive.hir.stdout
+++ b/tests/ui/unpretty/exhaustive.hir.stdout
@@ -30,7 +30,7 @@
 #![allow(incomplete_features)]
 #[prelude_import]
 use std::prelude::rust_2024::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 
 #[prelude_import]
diff --git a/tests/ui/unpretty/flattened-format-args.stdout b/tests/ui/unpretty/flattened-format-args.stdout
index 4af82924c7b..3cd02734665 100644
--- a/tests/ui/unpretty/flattened-format-args.stdout
+++ b/tests/ui/unpretty/flattened-format-args.stdout
@@ -1,6 +1,6 @@
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 //@ compile-flags: -Zunpretty=hir -Zflatten-format-args=yes
 //@ check-pass
diff --git a/tests/ui/unpretty/let-else-hir.stdout b/tests/ui/unpretty/let-else-hir.stdout
index a6dd943ec1b..a83790d8bee 100644
--- a/tests/ui/unpretty/let-else-hir.stdout
+++ b/tests/ui/unpretty/let-else-hir.stdout
@@ -1,6 +1,6 @@
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 //@ compile-flags: -Zunpretty=hir
 //@ check-pass
diff --git a/tests/ui/unpretty/self-hir.stdout b/tests/ui/unpretty/self-hir.stdout
index a9e80b1f592..1eafc3c8b46 100644
--- a/tests/ui/unpretty/self-hir.stdout
+++ b/tests/ui/unpretty/self-hir.stdout
@@ -1,6 +1,6 @@
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 //@ compile-flags: -Zunpretty=hir
 //@ check-pass
diff --git a/tests/ui/unpretty/unpretty-expr-fn-arg.stdout b/tests/ui/unpretty/unpretty-expr-fn-arg.stdout
index fd2e794fcac..e9fd2222a8d 100644
--- a/tests/ui/unpretty/unpretty-expr-fn-arg.stdout
+++ b/tests/ui/unpretty/unpretty-expr-fn-arg.stdout
@@ -10,7 +10,7 @@
 #![allow(dead_code)]
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
-#[macro_use]
+#[attr = MacroUse {arguments: UseAll}]
 extern crate std;
 
 fn main() ({ } as ())