about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/attributes/rustc_confusables.stderr20
-rw-r--r--tests/ui/deprecation/deprecation-sanity.rs4
-rw-r--r--tests/ui/deprecation/deprecation-sanity.stderr73
-rw-r--r--tests/ui/deprecation/invalid-literal.stderr19
-rw-r--r--tests/ui/error-codes/E0534.stderr22
-rw-r--r--tests/ui/error-codes/E0539.rs (renamed from tests/ui/error-codes/E0565-2.rs)2
-rw-r--r--tests/ui/error-codes/E0539.stderr13
-rw-r--r--tests/ui/error-codes/E0540.rs (renamed from tests/ui/error-codes/E0534.rs)0
-rw-r--r--tests/ui/error-codes/E0540.stderr19
-rw-r--r--tests/ui/error-codes/E0565-1.stderr20
-rw-r--r--tests/ui/error-codes/E0565-2.stderr11
-rw-r--r--tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr20
-rw-r--r--tests/ui/force-inlining/invalid.stderr32
-rw-r--r--tests/ui/invalid/invalid-inline.stderr24
-rw-r--r--tests/ui/issues/issue-43988.stderr48
-rw-r--r--tests/ui/lint/unused/unused-attr-duplicate.stderr36
-rw-r--r--tests/ui/macros/genercs-in-path-with-prettry-hir.stdout2
-rw-r--r--tests/ui/repr/repr.stderr22
-rw-r--r--tests/ui/span/E0539.rs (renamed from tests/ui/span/E0535.rs)0
-rw-r--r--tests/ui/span/E0539.stderr (renamed from tests/ui/span/E0535.stderr)11
-rw-r--r--tests/ui/stability-attribute/stability-attribute-sanity-2.stderr11
-rw-r--r--tests/ui/stability-attribute/stability-attribute-sanity.stderr44
22 files changed, 216 insertions, 237 deletions
diff --git a/tests/ui/attributes/rustc_confusables.stderr b/tests/ui/attributes/rustc_confusables.stderr
index be16da2f873..3ed4efeb4db 100644
--- a/tests/ui/attributes/rustc_confusables.stderr
+++ b/tests/ui/attributes/rustc_confusables.stderr
@@ -8,25 +8,19 @@ error[E0539]: malformed `rustc_confusables` attribute input
   --> $DIR/rustc_confusables.rs:34:5
    |
 LL |     #[rustc_confusables]
-   |     ^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_confusables("name1", "name2", ...)]`
-   |
-note: expected this to be a list
-  --> $DIR/rustc_confusables.rs:34:5
-   |
-LL |     #[rustc_confusables]
    |     ^^^^^^^^^^^^^^^^^^^^
+   |     |
+   |     expected this to be a list
+   |     help: must be of the form: `#[rustc_confusables("name1", "name2", ...)]`
 
 error[E0539]: malformed `rustc_confusables` attribute input
   --> $DIR/rustc_confusables.rs:39:5
    |
 LL |     #[rustc_confusables(invalid_meta_item)]
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_confusables("name1", "name2", ...)]`
-   |
-note: expected a string literal here
-  --> $DIR/rustc_confusables.rs:39:25
-   |
-LL |     #[rustc_confusables(invalid_meta_item)]
-   |                         ^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^-----------------^^
+   |     |                   |
+   |     |                   expected a string literal here
+   |     help: must be of the form: `#[rustc_confusables("name1", "name2", ...)]`
 
 error: attribute should be applied to an inherent method
   --> $DIR/rustc_confusables.rs:45:1
diff --git a/tests/ui/deprecation/deprecation-sanity.rs b/tests/ui/deprecation/deprecation-sanity.rs
index e40b017378a..80198ab8196 100644
--- a/tests/ui/deprecation/deprecation-sanity.rs
+++ b/tests/ui/deprecation/deprecation-sanity.rs
@@ -16,10 +16,10 @@ mod bogus_attribute_types_1 {
     #[deprecated(since(b), note = "a")] //~ ERROR malformed `deprecated` attribute input [E0539]
     fn f6() { }
 
-    #[deprecated(note = b"test")] //~ ERROR literal in `deprecated` value must be a string
+    #[deprecated(note = b"test")] //~ ERROR malformed `deprecated` attribute input [E0539]
     fn f7() { }
 
-    #[deprecated("test")] //~ ERROR item in `deprecated` must be a key/value pair
+    #[deprecated("test")] //~ ERROR malformed `deprecated` attribute input [E0565]
     fn f8() { }
 }
 
diff --git a/tests/ui/deprecation/deprecation-sanity.stderr b/tests/ui/deprecation/deprecation-sanity.stderr
index 8854ebb70d2..f1b4697485c 100644
--- a/tests/ui/deprecation/deprecation-sanity.stderr
+++ b/tests/ui/deprecation/deprecation-sanity.stderr
@@ -8,13 +8,10 @@ error[E0539]: malformed `deprecated` attribute input
   --> $DIR/deprecation-sanity.rs:7:5
    |
 LL |     #[deprecated(since = "a", note)]
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^----^^
+   |                               |
+   |                               expected this to be of the form `note = "..."`
    |
-note: expected this to be of the form `note = "..."`
-  --> $DIR/deprecation-sanity.rs:7:31
-   |
-LL |     #[deprecated(since = "a", note)]
-   |                               ^^^^
 help: try changing it to one of the following valid forms of the attribute
    |
 LL -     #[deprecated(since = "a", note)]
@@ -31,13 +28,10 @@ error[E0539]: malformed `deprecated` attribute input
   --> $DIR/deprecation-sanity.rs:10:5
    |
 LL |     #[deprecated(since, note = "a")]
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-note: expected this to be of the form `since = "..."`
-  --> $DIR/deprecation-sanity.rs:10:18
+   |     ^^^^^^^^^^^^^-----^^^^^^^^^^^^^^
+   |                  |
+   |                  expected this to be of the form `since = "..."`
    |
-LL |     #[deprecated(since, note = "a")]
-   |                  ^^^^^
 help: try changing it to one of the following valid forms of the attribute
    |
 LL -     #[deprecated(since, note = "a")]
@@ -54,13 +48,10 @@ error[E0539]: malformed `deprecated` attribute input
   --> $DIR/deprecation-sanity.rs:13:5
    |
 LL |     #[deprecated(since = "a", note(b))]
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-note: expected this to be of the form `note = "..."`
-  --> $DIR/deprecation-sanity.rs:13:31
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^-------^^
+   |                               |
+   |                               expected this to be of the form `note = "..."`
    |
-LL |     #[deprecated(since = "a", note(b))]
-   |                               ^^^^^^^
 help: try changing it to one of the following valid forms of the attribute
    |
 LL -     #[deprecated(since = "a", note(b))]
@@ -77,13 +68,10 @@ error[E0539]: malformed `deprecated` attribute input
   --> $DIR/deprecation-sanity.rs:16:5
    |
 LL |     #[deprecated(since(b), note = "a")]
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^^^^^--------^^^^^^^^^^^^^^
+   |                  |
+   |                  expected this to be of the form `since = "..."`
    |
-note: expected this to be of the form `since = "..."`
-  --> $DIR/deprecation-sanity.rs:16:18
-   |
-LL |     #[deprecated(since(b), note = "a")]
-   |                  ^^^^^^^^
 help: try changing it to one of the following valid forms of the attribute
    |
 LL -     #[deprecated(since(b), note = "a")]
@@ -96,19 +84,35 @@ LL -     #[deprecated(since(b), note = "a")]
 LL +     #[deprecated]
    |
 
-error[E0565]: literal in `deprecated` value must be a string
-  --> $DIR/deprecation-sanity.rs:19:25
+error[E0539]: malformed `deprecated` attribute input
+  --> $DIR/deprecation-sanity.rs:19:5
    |
 LL |     #[deprecated(note = b"test")]
-   |                         -^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^-^^^^^^^^
    |                         |
    |                         help: consider removing the prefix
+   |
+   = note: expected a normal string literal, not a byte string literal
 
-error[E0565]: item in `deprecated` must be a key/value pair
-  --> $DIR/deprecation-sanity.rs:22:18
+error[E0565]: malformed `deprecated` attribute input
+  --> $DIR/deprecation-sanity.rs:22:5
    |
 LL |     #[deprecated("test")]
-   |                  ^^^^^^
+   |     ^^^^^^^^^^^^^------^^
+   |                  |
+   |                  didn't expect a literal here
+   |
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL -     #[deprecated("test")]
+LL +     #[deprecated = "reason"]
+   |
+LL -     #[deprecated("test")]
+LL +     #[deprecated(/*opt*/ since = "version", /*opt*/ note = "reason")]
+   |
+LL -     #[deprecated("test")]
+LL +     #[deprecated]
+   |
 
 error: multiple `deprecated` attributes
   --> $DIR/deprecation-sanity.rs:27:1
@@ -126,13 +130,10 @@ error[E0538]: malformed `deprecated` attribute input
   --> $DIR/deprecation-sanity.rs:30:1
    |
 LL | #[deprecated(since = "a", since = "b", note = "c")]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^-----------^^^^^^^^^^^^^^
+   |                           |
+   |                           found `since` used as a key more than once
    |
-note: found `since` used as a key more than once
-  --> $DIR/deprecation-sanity.rs:30:27
-   |
-LL | #[deprecated(since = "a", since = "b", note = "c")]
-   |                           ^^^^^
 help: try changing it to one of the following valid forms of the attribute
    |
 LL - #[deprecated(since = "a", since = "b", note = "c")]
diff --git a/tests/ui/deprecation/invalid-literal.stderr b/tests/ui/deprecation/invalid-literal.stderr
index cbe1fcca023..6f25aebc315 100644
--- a/tests/ui/deprecation/invalid-literal.stderr
+++ b/tests/ui/deprecation/invalid-literal.stderr
@@ -1,20 +1,13 @@
-error: malformed `deprecated` attribute input
+error[E0539]: malformed `deprecated` attribute input
   --> $DIR/invalid-literal.rs:1:1
    |
 LL | #[deprecated = b"test"]
-   | ^^^^^^^^^^^^^^^^^^^^^^^
-   |
-help: the following are the possible correct uses
-   |
-LL - #[deprecated = b"test"]
-LL + #[deprecated = "reason"]
-   |
-LL - #[deprecated = b"test"]
-LL + #[deprecated(/*opt*/ since = "version", /*opt*/ note = "reason")]
-   |
-LL - #[deprecated = b"test"]
-LL + #[deprecated]
+   | ^^^^^^^^^^^^^^^-^^^^^^^
+   |                |
+   |                help: consider removing the prefix
    |
+   = note: expected a normal string literal, not a byte string literal
 
 error: aborting due to 1 previous error
 
+For more information about this error, try `rustc --explain E0539`.
diff --git a/tests/ui/error-codes/E0534.stderr b/tests/ui/error-codes/E0534.stderr
deleted file mode 100644
index de97ef18b73..00000000000
--- a/tests/ui/error-codes/E0534.stderr
+++ /dev/null
@@ -1,22 +0,0 @@
-error[E0539]: malformed `inline` attribute input
-  --> $DIR/E0534.rs:1:1
-   |
-LL | #[inline()]
-   | ^^^^^^^^^^^
-   |
-note: expected a single argument here
-  --> $DIR/E0534.rs:1:9
-   |
-LL | #[inline()]
-   |         ^^
-help: try changing it to one of the following valid forms of the attribute
-   |
-LL | #[inline(always|never)]
-   |          ++++++++++++
-LL - #[inline()]
-LL + #[inline]
-   |
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0539`.
diff --git a/tests/ui/error-codes/E0565-2.rs b/tests/ui/error-codes/E0539.rs
index 0319ecb11f9..0e2c537f473 100644
--- a/tests/ui/error-codes/E0565-2.rs
+++ b/tests/ui/error-codes/E0539.rs
@@ -1,5 +1,5 @@
 // repr currently doesn't support literals
-#[deprecated(since = b"1.29", note = "hi")] //~ ERROR E0565
+#[deprecated(since = b"1.29", note = "hi")] //~ ERROR E0539
 struct A {  }
 
 fn main() {  }
diff --git a/tests/ui/error-codes/E0539.stderr b/tests/ui/error-codes/E0539.stderr
new file mode 100644
index 00000000000..18ed1c23b40
--- /dev/null
+++ b/tests/ui/error-codes/E0539.stderr
@@ -0,0 +1,13 @@
+error[E0539]: malformed `deprecated` attribute input
+  --> $DIR/E0539.rs:2:1
+   |
+LL | #[deprecated(since = b"1.29", note = "hi")]
+   | ^^^^^^^^^^^^^^^^^^^^^-^^^^^^^^^^^^^^^^^^^^^
+   |                      |
+   |                      help: consider removing the prefix
+   |
+   = note: expected a normal string literal, not a byte string literal
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0539`.
diff --git a/tests/ui/error-codes/E0534.rs b/tests/ui/error-codes/E0540.rs
index db29e6801f5..db29e6801f5 100644
--- a/tests/ui/error-codes/E0534.rs
+++ b/tests/ui/error-codes/E0540.rs
diff --git a/tests/ui/error-codes/E0540.stderr b/tests/ui/error-codes/E0540.stderr
new file mode 100644
index 00000000000..3e5f408feb5
--- /dev/null
+++ b/tests/ui/error-codes/E0540.stderr
@@ -0,0 +1,19 @@
+error[E0805]: malformed `inline` attribute input
+  --> $DIR/E0540.rs:1:1
+   |
+LL | #[inline()]
+   | ^^^^^^^^--^
+   |         |
+   |         expected a single argument here
+   |
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL | #[inline(always|never)]
+   |          ++++++++++++
+LL - #[inline()]
+LL + #[inline]
+   |
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0805`.
diff --git a/tests/ui/error-codes/E0565-1.stderr b/tests/ui/error-codes/E0565-1.stderr
index 806eed2a632..6277e6400d7 100644
--- a/tests/ui/error-codes/E0565-1.stderr
+++ b/tests/ui/error-codes/E0565-1.stderr
@@ -1,8 +1,22 @@
-error[E0565]: item in `deprecated` must be a key/value pair
-  --> $DIR/E0565-1.rs:2:14
+error[E0565]: malformed `deprecated` attribute input
+  --> $DIR/E0565-1.rs:2:1
    |
 LL | #[deprecated("since")]
-   |              ^^^^^^^
+   | ^^^^^^^^^^^^^-------^^
+   |              |
+   |              didn't expect a literal here
+   |
+help: try changing it to one of the following valid forms of the attribute
+   |
+LL - #[deprecated("since")]
+LL + #[deprecated = "reason"]
+   |
+LL - #[deprecated("since")]
+LL + #[deprecated(/*opt*/ since = "version", /*opt*/ note = "reason")]
+   |
+LL - #[deprecated("since")]
+LL + #[deprecated]
+   |
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/error-codes/E0565-2.stderr b/tests/ui/error-codes/E0565-2.stderr
deleted file mode 100644
index 42199351c3d..00000000000
--- a/tests/ui/error-codes/E0565-2.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0565]: literal in `deprecated` value must be a string
-  --> $DIR/E0565-2.rs:2:22
-   |
-LL | #[deprecated(since = b"1.29", note = "hi")]
-   |                      -^^^^^^
-   |                      |
-   |                      help: consider removing the prefix
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0565`.
diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr
index a9ef0bbc6e7..1620bf72922 100644
--- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr
+++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr
@@ -8,16 +8,6 @@ LL | #![rustc_main]
    = note: the `#[rustc_main]` attribute is an internal implementation detail that will never be stable
    = note: the `#[rustc_main]` attribute is used internally to specify test entry point function
 
-error: valid forms for the attribute are `#[inline(always|never)]` and `#[inline]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:46:5
-   |
-LL |     #[inline = "2100"] fn f() { }
-   |     ^^^^^^^^^^^^^^^^^^
-   |
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-   = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
-   = note: `#[deny(ill_formed_attribute_input)]` on by default
-
 error[E0518]: attribute should be applied to function or closure
   --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:32:1
    |
@@ -314,6 +304,16 @@ error[E0517]: attribute should be applied to a struct, enum, or union
 LL |     #[repr(Rust)] impl S { }
    |            ^^^^   ---------- not a struct, enum, or union
 
+error: valid forms for the attribute are `#[inline(always|never)]` and `#[inline]`
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:46:5
+   |
+LL |     #[inline = "2100"] fn f() { }
+   |     ^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #57571 <https://github.com/rust-lang/rust/issues/57571>
+   = note: `#[deny(ill_formed_attribute_input)]` on by default
+
 error: aborting due to 38 previous errors
 
 Some errors have detailed explanations: E0517, E0518, E0658.
diff --git a/tests/ui/force-inlining/invalid.stderr b/tests/ui/force-inlining/invalid.stderr
index a12f633b3f2..3b3da00ae88 100644
--- a/tests/ui/force-inlining/invalid.stderr
+++ b/tests/ui/force-inlining/invalid.stderr
@@ -4,17 +4,14 @@ error: allow, cfg, cfg_attr, deny, expect, forbid, and warn are the only allowed
 LL | fn barqux(#[rustc_force_inline] _x: u32) {}
    |           ^^^^^^^^^^^^^^^^^^^^^
 
-error[E0539]: malformed `rustc_force_inline` attribute input
+error[E0805]: malformed `rustc_force_inline` attribute input
   --> $DIR/invalid.rs:15:1
    |
 LL | #[rustc_force_inline(bar, baz)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-note: expected a single argument here
-  --> $DIR/invalid.rs:15:21
+   | ^^^^^^^^^^^^^^^^^^^^----------^
+   |                     |
+   |                     expected a single argument here
    |
-LL | #[rustc_force_inline(bar, baz)]
-   |                     ^^^^^^^^^^
 help: try changing it to one of the following valid forms of the attribute
    |
 LL - #[rustc_force_inline(bar, baz)]
@@ -31,13 +28,10 @@ error[E0539]: malformed `rustc_force_inline` attribute input
   --> $DIR/invalid.rs:20:1
    |
 LL | #[rustc_force_inline(2)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-note: expected a string literal here
-  --> $DIR/invalid.rs:20:22
+   | ^^^^^^^^^^^^^^^^^^^^^-^^
+   |                      |
+   |                      expected a string literal here
    |
-LL | #[rustc_force_inline(2)]
-   |                      ^
 help: try changing it to one of the following valid forms of the attribute
    |
 LL - #[rustc_force_inline(2)]
@@ -54,13 +48,10 @@ error[E0539]: malformed `rustc_force_inline` attribute input
   --> $DIR/invalid.rs:25:1
    |
 LL | #[rustc_force_inline = 2]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-note: expected a string literal here
-  --> $DIR/invalid.rs:25:24
+   | ^^^^^^^^^^^^^^^^^^^^^^^-^
+   |                        |
+   |                        expected a string literal here
    |
-LL | #[rustc_force_inline = 2]
-   |                        ^
 help: try changing it to one of the following valid forms of the attribute
    |
 LL - #[rustc_force_inline = 2]
@@ -392,4 +383,5 @@ LL |     fn foo();
 
 error: aborting due to 37 previous errors
 
-For more information about this error, try `rustc --explain E0539`.
+Some errors have detailed explanations: E0539, E0805.
+For more information about an error, try `rustc --explain E0539`.
diff --git a/tests/ui/invalid/invalid-inline.stderr b/tests/ui/invalid/invalid-inline.stderr
index 8a230351d32..54e6b2b5408 100644
--- a/tests/ui/invalid/invalid-inline.stderr
+++ b/tests/ui/invalid/invalid-inline.stderr
@@ -1,14 +1,11 @@
-error[E0539]: malformed `inline` attribute input
+error[E0805]: malformed `inline` attribute input
   --> $DIR/invalid-inline.rs:3:1
    |
 LL | #[inline(please,no)]
-   | ^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^-----------^
+   |         |
+   |         expected a single argument here
    |
-note: expected a single argument here
-  --> $DIR/invalid-inline.rs:3:9
-   |
-LL | #[inline(please,no)]
-   |         ^^^^^^^^^^^
 help: try changing it to one of the following valid forms of the attribute
    |
 LL - #[inline(please,no)]
@@ -18,17 +15,14 @@ LL - #[inline(please,no)]
 LL + #[inline]
    |
 
-error[E0539]: malformed `inline` attribute input
+error[E0805]: malformed `inline` attribute input
   --> $DIR/invalid-inline.rs:7:1
    |
 LL | #[inline()]
-   | ^^^^^^^^^^^
+   | ^^^^^^^^--^
+   |         |
+   |         expected a single argument here
    |
-note: expected a single argument here
-  --> $DIR/invalid-inline.rs:7:9
-   |
-LL | #[inline()]
-   |         ^^
 help: try changing it to one of the following valid forms of the attribute
    |
 LL | #[inline(always|never)]
@@ -39,4 +33,4 @@ LL + #[inline]
 
 error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0539`.
+For more information about this error, try `rustc --explain E0805`.
diff --git a/tests/ui/issues/issue-43988.stderr b/tests/ui/issues/issue-43988.stderr
index 8e731db6f2e..bd4eb8bbed3 100644
--- a/tests/ui/issues/issue-43988.stderr
+++ b/tests/ui/issues/issue-43988.stderr
@@ -1,26 +1,11 @@
-error: malformed `repr` attribute input
-  --> $DIR/issue-43988.rs:24:5
-   |
-LL |     #[repr]
-   |     ^^^^^^^ help: must be of the form: `#[repr(C)]`
-
-error: malformed `repr` attribute input
-  --> $DIR/issue-43988.rs:34:14
-   |
-LL |     let _z = #[repr] 1;
-   |              ^^^^^^^ help: must be of the form: `#[repr(C)]`
-
 error[E0539]: malformed `inline` attribute input
   --> $DIR/issue-43988.rs:10:5
    |
 LL |     #[inline(XYZ)]
-   |     ^^^^^^^^^^^^^^
+   |     ^^^^^^^^^---^^
+   |              |
+   |              valid arguments are `always` or `never`
    |
-note: valid arguments are `always` or `never`
-  --> $DIR/issue-43988.rs:10:14
-   |
-LL |     #[inline(XYZ)]
-   |              ^^^
 help: try changing it to one of the following valid forms of the attribute
    |
 LL -     #[inline(XYZ)]
@@ -46,17 +31,23 @@ LL |     #[repr(something_not_real)]
    |
    = help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
 
+error[E0539]: malformed `repr` attribute input
+  --> $DIR/issue-43988.rs:24:5
+   |
+LL |     #[repr]
+   |     ^^^^^^^
+   |     |
+   |     expected this to be a list
+   |     help: must be of the form: `#[repr(C)]`
+
 error[E0539]: malformed `inline` attribute input
   --> $DIR/issue-43988.rs:30:5
    |
 LL |     #[inline(ABC)]
-   |     ^^^^^^^^^^^^^^
-   |
-note: valid arguments are `always` or `never`
-  --> $DIR/issue-43988.rs:30:14
+   |     ^^^^^^^^^---^^
+   |              |
+   |              valid arguments are `always` or `never`
    |
-LL |     #[inline(ABC)]
-   |              ^^^
 help: try changing it to one of the following valid forms of the attribute
    |
 LL -     #[inline(ABC)]
@@ -66,6 +57,15 @@ LL -     #[inline(ABC)]
 LL +     #[inline]
    |
 
+error[E0539]: malformed `repr` attribute input
+  --> $DIR/issue-43988.rs:34:14
+   |
+LL |     let _z = #[repr] 1;
+   |              ^^^^^^^
+   |              |
+   |              expected this to be a list
+   |              help: must be of the form: `#[repr(C)]`
+
 error[E0518]: attribute should be applied to function or closure
   --> $DIR/issue-43988.rs:5:5
    |
diff --git a/tests/ui/lint/unused/unused-attr-duplicate.stderr b/tests/ui/lint/unused/unused-attr-duplicate.stderr
index 5ea623a713e..e1c45e832af 100644
--- a/tests/ui/lint/unused/unused-attr-duplicate.stderr
+++ b/tests/ui/lint/unused/unused-attr-duplicate.stderr
@@ -1,22 +1,4 @@
 error: unused attribute
-  --> $DIR/unused-attr-duplicate.rs:74:1
-   |
-LL | #[inline(never)]
-   | ^^^^^^^^^^^^^^^^ help: remove this attribute
-   |
-note: attribute also specified here
-  --> $DIR/unused-attr-duplicate.rs:73:1
-   |
-LL | #[inline(always)]
-   | ^^^^^^^^^^^^^^^^^
-   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
-note: the lint level is defined here
-  --> $DIR/unused-attr-duplicate.rs:12:9
-   |
-LL | #![deny(unused_attributes)]
-   |         ^^^^^^^^^^^^^^^^^
-
-error: unused attribute
   --> $DIR/unused-attr-duplicate.rs:33:1
    |
 LL | #[no_link]
@@ -27,6 +9,11 @@ note: attribute also specified here
    |
 LL | #[no_link]
    | ^^^^^^^^^^
+note: the lint level is defined here
+  --> $DIR/unused-attr-duplicate.rs:12:9
+   |
+LL | #![deny(unused_attributes)]
+   |         ^^^^^^^^^^^^^^^^^
 
 error: unused attribute
   --> $DIR/unused-attr-duplicate.rs:37:1
@@ -289,5 +276,18 @@ note: attribute also specified here
 LL |     #[macro_export]
    |     ^^^^^^^^^^^^^^^
 
+error: unused attribute
+  --> $DIR/unused-attr-duplicate.rs:74:1
+   |
+LL | #[inline(never)]
+   | ^^^^^^^^^^^^^^^^ help: remove this attribute
+   |
+note: attribute also specified here
+  --> $DIR/unused-attr-duplicate.rs:73:1
+   |
+LL | #[inline(always)]
+   | ^^^^^^^^^^^^^^^^^
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+
 error: aborting due to 23 previous errors
 
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 834954d8dc0..7c41225f95e 100644
--- a/tests/ui/macros/genercs-in-path-with-prettry-hir.stdout
+++ b/tests/ui/macros/genercs-in-path-with-prettry-hir.stdout
@@ -8,7 +8,7 @@ extern crate std;
 // issue#97006
 
 macro_rules! m { ($attr_path: path) => { #[$attr_path] fn f() {} } }
-#[attr="Inline(Hint)")]
+#[attr = Inline(Hint)]
 fn f() { }
 
 fn main() { }
diff --git a/tests/ui/repr/repr.stderr b/tests/ui/repr/repr.stderr
index e0bec666381..f3b11398eaa 100644
--- a/tests/ui/repr/repr.stderr
+++ b/tests/ui/repr/repr.stderr
@@ -1,20 +1,30 @@
-error: malformed `repr` attribute input
+error[E0539]: malformed `repr` attribute input
   --> $DIR/repr.rs:1:1
    |
 LL | #[repr]
-   | ^^^^^^^ help: must be of the form: `#[repr(C)]`
+   | ^^^^^^^
+   | |
+   | expected this to be a list
+   | help: must be of the form: `#[repr(C)]`
 
-error: malformed `repr` attribute input
+error[E0539]: malformed `repr` attribute input
   --> $DIR/repr.rs:4:1
    |
 LL | #[repr = "B"]
-   | ^^^^^^^^^^^^^ help: must be of the form: `#[repr(C)]`
+   | ^^^^^^^^^^^^^
+   | |
+   | expected this to be a list
+   | help: must be of the form: `#[repr(C)]`
 
-error: malformed `repr` attribute input
+error[E0539]: malformed `repr` attribute input
   --> $DIR/repr.rs:7:1
    |
 LL | #[repr = "C"]
-   | ^^^^^^^^^^^^^ help: must be of the form: `#[repr(C)]`
+   | ^^^^^^^^^^^^^
+   | |
+   | expected this to be a list
+   | help: must be of the form: `#[repr(C)]`
 
 error: aborting due to 3 previous errors
 
+For more information about this error, try `rustc --explain E0539`.
diff --git a/tests/ui/span/E0535.rs b/tests/ui/span/E0539.rs
index e0c6dbfc591..e0c6dbfc591 100644
--- a/tests/ui/span/E0535.rs
+++ b/tests/ui/span/E0539.rs
diff --git a/tests/ui/span/E0535.stderr b/tests/ui/span/E0539.stderr
index fb0b72c0001..01f091a2676 100644
--- a/tests/ui/span/E0535.stderr
+++ b/tests/ui/span/E0539.stderr
@@ -1,14 +1,11 @@
 error[E0539]: malformed `inline` attribute input
-  --> $DIR/E0535.rs:1:1
+  --> $DIR/E0539.rs:1:1
    |
 LL | #[inline(unknown)]
-   | ^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^-------^^
+   |          |
+   |          valid arguments are `always` or `never`
    |
-note: valid arguments are `always` or `never`
-  --> $DIR/E0535.rs:1:10
-   |
-LL | #[inline(unknown)]
-   |          ^^^^^^^
 help: try changing it to one of the following valid forms of the attribute
    |
 LL - #[inline(unknown)]
diff --git a/tests/ui/stability-attribute/stability-attribute-sanity-2.stderr b/tests/ui/stability-attribute/stability-attribute-sanity-2.stderr
index 412af87bad6..5b35a51cad7 100644
--- a/tests/ui/stability-attribute/stability-attribute-sanity-2.stderr
+++ b/tests/ui/stability-attribute/stability-attribute-sanity-2.stderr
@@ -2,13 +2,10 @@ error[E0538]: malformed `stable` attribute input
   --> $DIR/stability-attribute-sanity-2.rs:7:1
    |
 LL | #[stable(feature = "a", feature = "b", since = "1.0.0")]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[stable(feature = "name", since = "version")]`
-   |
-note: found `feature` used as a key more than once
-  --> $DIR/stability-attribute-sanity-2.rs:7:25
-   |
-LL | #[stable(feature = "a", feature = "b", since = "1.0.0")]
-   |                         ^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^^^^-------^^^^^^^^^^^^^^^^^^^^^^^^^
+   | |                       |
+   | |                       found `feature` used as a key more than once
+   | help: must be of the form: `#[stable(feature = "name", since = "version")]`
 
 error[E0541]: unknown meta item 'sinse'
   --> $DIR/stability-attribute-sanity-2.rs:10:25
diff --git a/tests/ui/stability-attribute/stability-attribute-sanity.stderr b/tests/ui/stability-attribute/stability-attribute-sanity.stderr
index 86284b0c1b8..ae948237d7e 100644
--- a/tests/ui/stability-attribute/stability-attribute-sanity.stderr
+++ b/tests/ui/stability-attribute/stability-attribute-sanity.stderr
@@ -8,49 +8,37 @@ error[E0539]: malformed `stable` attribute input
   --> $DIR/stability-attribute-sanity.rs:11:5
    |
 LL |     #[stable(feature = "a", since)]
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[stable(feature = "name", since = "version")]`
-   |
-note: expected this to be of the form `since = "..."`
-  --> $DIR/stability-attribute-sanity.rs:11:29
-   |
-LL |     #[stable(feature = "a", since)]
-   |                             ^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^-----^^
+   |     |                       |
+   |     |                       expected this to be of the form `since = "..."`
+   |     help: must be of the form: `#[stable(feature = "name", since = "version")]`
 
 error[E0539]: malformed `stable` attribute input
   --> $DIR/stability-attribute-sanity.rs:14:5
    |
 LL |     #[stable(feature, since = "3.3.3")]
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[stable(feature = "name", since = "version")]`
-   |
-note: expected this to be of the form `feature = "..."`
-  --> $DIR/stability-attribute-sanity.rs:14:14
-   |
-LL |     #[stable(feature, since = "3.3.3")]
-   |              ^^^^^^^
+   |     ^^^^^^^^^-------^^^^^^^^^^^^^^^^^^^
+   |     |        |
+   |     |        expected this to be of the form `feature = "..."`
+   |     help: must be of the form: `#[stable(feature = "name", since = "version")]`
 
 error[E0539]: malformed `stable` attribute input
   --> $DIR/stability-attribute-sanity.rs:17:5
    |
 LL |     #[stable(feature = "a", since(b))]
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[stable(feature = "name", since = "version")]`
-   |
-note: expected this to be of the form `since = "..."`
-  --> $DIR/stability-attribute-sanity.rs:17:29
-   |
-LL |     #[stable(feature = "a", since(b))]
-   |                             ^^^^^^^^
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^--------^^
+   |     |                       |
+   |     |                       expected this to be of the form `since = "..."`
+   |     help: must be of the form: `#[stable(feature = "name", since = "version")]`
 
 error[E0539]: malformed `stable` attribute input
   --> $DIR/stability-attribute-sanity.rs:20:5
    |
 LL |     #[stable(feature(b), since = "3.3.3")]
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[stable(feature = "name", since = "version")]`
-   |
-note: expected this to be of the form `feature = "..."`
-  --> $DIR/stability-attribute-sanity.rs:20:14
-   |
-LL |     #[stable(feature(b), since = "3.3.3")]
-   |              ^^^^^^^^^^
+   |     ^^^^^^^^^----------^^^^^^^^^^^^^^^^^^^
+   |     |        |
+   |     |        expected this to be of the form `feature = "..."`
+   |     help: must be of the form: `#[stable(feature = "name", since = "version")]`
 
 error[E0546]: missing 'feature'
   --> $DIR/stability-attribute-sanity.rs:25:5