about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2020-11-19 01:49:20 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2020-11-19 19:25:20 +0300
commit68f94e94ed3d80d768d0d107049f02fb99716dbe (patch)
tree6762abfbf8b4355855072aeb25e6bdab73f150eb /src/test
parent69894ce9ac337e51730519e071c94a4bb9c926f2 (diff)
downloadrust-68f94e94ed3d80d768d0d107049f02fb99716dbe.tar.gz
rust-68f94e94ed3d80d768d0d107049f02fb99716dbe.zip
resolve: Centralize some error reporting for unexpected macro resolutions
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/attrs-resolution-errors.rs10
-rw-r--r--src/test/ui/attrs-resolution-errors.stderr30
-rw-r--r--src/test/ui/proc-macro/proc-macro-gates.rs4
-rw-r--r--src/test/ui/proc-macro/proc-macro-gates.stderr12
-rw-r--r--src/test/ui/proc-macro/proc-macro-gates2.rs4
-rw-r--r--src/test/ui/proc-macro/proc-macro-gates2.stderr12
-rw-r--r--src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.rs20
-rw-r--r--src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.stderr60
-rw-r--r--src/test/ui/rfc-2565-param-attrs/proc-macro-cannot-be-used.rs58
-rw-r--r--src/test/ui/rfc-2565-param-attrs/proc-macro-cannot-be-used.stderr174
-rw-r--r--src/test/ui/span/issue-36530.rs2
-rw-r--r--src/test/ui/span/issue-36530.stderr6
12 files changed, 196 insertions, 196 deletions
diff --git a/src/test/ui/attrs-resolution-errors.rs b/src/test/ui/attrs-resolution-errors.rs
index a38b3cfa666..8770fb1ded8 100644
--- a/src/test/ui/attrs-resolution-errors.rs
+++ b/src/test/ui/attrs-resolution-errors.rs
@@ -1,12 +1,12 @@
 enum FooEnum {
     #[test]
-    //~^ ERROR expected an inert attribute, found an attribute macro
+    //~^ ERROR expected non-macro attribute, found attribute macro
     Bar(i32),
 }
 
 struct FooStruct {
     #[test]
-    //~^ ERROR expected an inert attribute, found an attribute macro
+    //~^ ERROR expected non-macro attribute, found attribute macro
     bar: i32,
 }
 
@@ -21,20 +21,20 @@ fn main() {
     match foo_struct {
         FooStruct {
             #[test] bar
-            //~^ ERROR expected an inert attribute, found an attribute macro
+            //~^ ERROR expected non-macro attribute, found attribute macro
         } => {}
     }
 
     match 1 {
         0 => {}
         #[test]
-        //~^ ERROR expected an inert attribute, found an attribute macro
+        //~^ ERROR expected non-macro attribute, found attribute macro
         _ => {}
     }
 
     let _another_foo_strunct = FooStruct {
         #[test]
-        //~^ ERROR expected an inert attribute, found an attribute macro
+        //~^ ERROR expected non-macro attribute, found attribute macro
         bar: 1,
     };
 }
diff --git a/src/test/ui/attrs-resolution-errors.stderr b/src/test/ui/attrs-resolution-errors.stderr
index 31f2a74edb3..883f96e5c19 100644
--- a/src/test/ui/attrs-resolution-errors.stderr
+++ b/src/test/ui/attrs-resolution-errors.stderr
@@ -1,32 +1,32 @@
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/attrs-resolution-errors.rs:2:5
+error: expected non-macro attribute, found attribute macro `test`
+  --> $DIR/attrs-resolution-errors.rs:2:7
    |
 LL |     #[test]
-   |     ^^^^^^^
+   |       ^^^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/attrs-resolution-errors.rs:8:5
+error: expected non-macro attribute, found attribute macro `test`
+  --> $DIR/attrs-resolution-errors.rs:8:7
    |
 LL |     #[test]
-   |     ^^^^^^^
+   |       ^^^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/attrs-resolution-errors.rs:23:13
+error: expected non-macro attribute, found attribute macro `test`
+  --> $DIR/attrs-resolution-errors.rs:23:15
    |
 LL |             #[test] bar
-   |             ^^^^^^^
+   |               ^^^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/attrs-resolution-errors.rs:30:9
+error: expected non-macro attribute, found attribute macro `test`
+  --> $DIR/attrs-resolution-errors.rs:30:11
    |
 LL |         #[test]
-   |         ^^^^^^^
+   |           ^^^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/attrs-resolution-errors.rs:36:9
+error: expected non-macro attribute, found attribute macro `test`
+  --> $DIR/attrs-resolution-errors.rs:36:11
    |
 LL |         #[test]
-   |         ^^^^^^^
+   |           ^^^^ not a non-macro attribute
 
 error: aborting due to 5 previous errors
 
diff --git a/src/test/ui/proc-macro/proc-macro-gates.rs b/src/test/ui/proc-macro/proc-macro-gates.rs
index b3b677fa7ff..4c72ecbfc03 100644
--- a/src/test/ui/proc-macro/proc-macro-gates.rs
+++ b/src/test/ui/proc-macro/proc-macro-gates.rs
@@ -7,11 +7,11 @@
 extern crate test_macros;
 
 fn _test_inner() {
-    #![empty_attr] //~ ERROR: non-builtin inner attributes are unstable
+    #![empty_attr] //~ ERROR: inner macro attributes are unstable
 }
 
 mod _test2_inner {
-    #![empty_attr] //~ ERROR: non-builtin inner attributes are unstable
+    #![empty_attr] //~ ERROR: inner macro attributes are unstable
 }
 
 #[empty_attr = "y"] //~ ERROR: key-value macro attributes are not supported
diff --git a/src/test/ui/proc-macro/proc-macro-gates.stderr b/src/test/ui/proc-macro/proc-macro-gates.stderr
index c0343495531..33a808037ee 100644
--- a/src/test/ui/proc-macro/proc-macro-gates.stderr
+++ b/src/test/ui/proc-macro/proc-macro-gates.stderr
@@ -1,17 +1,17 @@
-error[E0658]: non-builtin inner attributes are unstable
-  --> $DIR/proc-macro-gates.rs:10:5
+error[E0658]: inner macro attributes are unstable
+  --> $DIR/proc-macro-gates.rs:10:8
    |
 LL |     #![empty_attr]
-   |     ^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^
    |
    = note: see issue #54726 <https://github.com/rust-lang/rust/issues/54726> for more information
    = help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable
 
-error[E0658]: non-builtin inner attributes are unstable
-  --> $DIR/proc-macro-gates.rs:14:5
+error[E0658]: inner macro attributes are unstable
+  --> $DIR/proc-macro-gates.rs:14:8
    |
 LL |     #![empty_attr]
-   |     ^^^^^^^^^^^^^^
+   |        ^^^^^^^^^^
    |
    = note: see issue #54726 <https://github.com/rust-lang/rust/issues/54726> for more information
    = help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable
diff --git a/src/test/ui/proc-macro/proc-macro-gates2.rs b/src/test/ui/proc-macro/proc-macro-gates2.rs
index 2fd5efd71f0..38fbd4733d5 100644
--- a/src/test/ui/proc-macro/proc-macro-gates2.rs
+++ b/src/test/ui/proc-macro/proc-macro-gates2.rs
@@ -10,11 +10,11 @@ extern crate test_macros;
 // should either require a feature gate or not be allowed on stable.
 
 fn _test6<#[empty_attr] T>() {}
-//~^ ERROR: expected an inert attribute, found an attribute macro
+//~^ ERROR: expected non-macro attribute, found attribute macro
 
 fn _test7() {
     match 1 {
-        #[empty_attr] //~ ERROR: expected an inert attribute, found an attribute macro
+        #[empty_attr] //~ ERROR: expected non-macro attribute, found attribute macro
         0 => {}
         _ => {}
     }
diff --git a/src/test/ui/proc-macro/proc-macro-gates2.stderr b/src/test/ui/proc-macro/proc-macro-gates2.stderr
index fd271da6155..64df34e7ce3 100644
--- a/src/test/ui/proc-macro/proc-macro-gates2.stderr
+++ b/src/test/ui/proc-macro/proc-macro-gates2.stderr
@@ -1,14 +1,14 @@
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-gates2.rs:12:11
+error: expected non-macro attribute, found attribute macro `empty_attr`
+  --> $DIR/proc-macro-gates2.rs:12:13
    |
 LL | fn _test6<#[empty_attr] T>() {}
-   |           ^^^^^^^^^^^^^
+   |             ^^^^^^^^^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-gates2.rs:17:9
+error: expected non-macro attribute, found attribute macro `empty_attr`
+  --> $DIR/proc-macro-gates2.rs:17:11
    |
 LL |         #[empty_attr]
-   |         ^^^^^^^^^^^^^
+   |           ^^^^^^^^^^ not a non-macro attribute
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.rs b/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.rs
index bf09171c9a1..6403b3f55c4 100644
--- a/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.rs
+++ b/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.rs
@@ -3,7 +3,7 @@ extern "C" {
         /// Foo
         //~^ ERROR documentation comments cannot be applied to function
         #[test] a: i32,
-        //~^ ERROR expected an inert attribute, found an attribute macro
+        //~^ ERROR expected non-macro attribute, found attribute macro
         /// Bar
         //~^ ERROR documentation comments cannot be applied to function
         #[must_use]
@@ -19,7 +19,7 @@ type FnType = fn(
     /// Foo
     //~^ ERROR documentation comments cannot be applied to function
     #[test] a: u32,
-    //~^ ERROR expected an inert attribute, found an attribute macro
+    //~^ ERROR expected non-macro attribute, found attribute macro
     /// Bar
     //~^ ERROR documentation comments cannot be applied to function
     #[must_use]
@@ -34,7 +34,7 @@ pub fn foo(
     /// Foo
     //~^ ERROR documentation comments cannot be applied to function
     #[test] a: u32,
-    //~^ ERROR expected an inert attribute, found an attribute macro
+    //~^ ERROR expected non-macro attribute, found attribute macro
     /// Bar
     //~^ ERROR documentation comments cannot be applied to function
     #[must_use]
@@ -54,7 +54,7 @@ impl SelfStruct {
         /// Bar
         //~^ ERROR documentation comments cannot be applied to function
         #[test] a: i32,
-        //~^ ERROR expected an inert attribute, found an attribute macro
+        //~^ ERROR expected non-macro attribute, found attribute macro
         /// Baz
         //~^ ERROR documentation comments cannot be applied to function
         #[must_use]
@@ -69,7 +69,7 @@ impl SelfStruct {
         /// Foo
         //~^ ERROR documentation comments cannot be applied to function
         #[test] a: i32,
-        //~^ ERROR expected an inert attribute, found an attribute macro
+        //~^ ERROR expected non-macro attribute, found attribute macro
         /// Baz
         //~^ ERROR documentation comments cannot be applied to function
         #[must_use]
@@ -90,7 +90,7 @@ impl RefStruct {
         /// Bar
         //~^ ERROR documentation comments cannot be applied to function
         #[test] a: i32,
-        //~^ ERROR expected an inert attribute, found an attribute macro
+        //~^ ERROR expected non-macro attribute, found attribute macro
         /// Baz
         //~^ ERROR documentation comments cannot be applied to function
         #[must_use]
@@ -109,7 +109,7 @@ trait RefTrait {
         /// Bar
         //~^ ERROR documentation comments cannot be applied to function
         #[test] a: i32,
-        //~^ ERROR expected an inert attribute, found an attribute macro
+        //~^ ERROR expected non-macro attribute, found attribute macro
         /// Baz
         //~^ ERROR documentation comments cannot be applied to function
         #[must_use]
@@ -124,7 +124,7 @@ trait RefTrait {
         /// Foo
         //~^ ERROR documentation comments cannot be applied to function
         #[test] a: i32,
-        //~^ ERROR expected an inert attribute, found an attribute macro
+        //~^ ERROR expected non-macro attribute, found attribute macro
         /// Baz
         //~^ ERROR documentation comments cannot be applied to function
         #[must_use]
@@ -144,7 +144,7 @@ impl RefTrait for RefStruct {
         /// Bar
         //~^ ERROR documentation comments cannot be applied to function
         #[test] a: i32,
-        //~^ ERROR expected an inert attribute, found an attribute macro
+        //~^ ERROR expected non-macro attribute, found attribute macro
         /// Baz
         //~^ ERROR documentation comments cannot be applied to function
         #[must_use]
@@ -161,7 +161,7 @@ fn main() {
         /// Foo
         //~^ ERROR documentation comments cannot be applied to function
         #[test] a: u32,
-        //~^ ERROR expected an inert attribute, found an attribute macro
+        //~^ ERROR expected non-macro attribute, found attribute macro
         /// Bar
         //~^ ERROR documentation comments cannot be applied to function
         #[must_use]
diff --git a/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.stderr b/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.stderr
index 4d0349e8765..edca8cea68d 100644
--- a/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.stderr
+++ b/src/test/ui/rfc-2565-param-attrs/param-attrs-builtin-attrs.stderr
@@ -1,62 +1,62 @@
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/param-attrs-builtin-attrs.rs:5:9
+error: expected non-macro attribute, found attribute macro `test`
+  --> $DIR/param-attrs-builtin-attrs.rs:5:11
    |
 LL |         #[test] a: i32,
-   |         ^^^^^^^
+   |           ^^^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/param-attrs-builtin-attrs.rs:21:5
+error: expected non-macro attribute, found attribute macro `test`
+  --> $DIR/param-attrs-builtin-attrs.rs:21:7
    |
 LL |     #[test] a: u32,
-   |     ^^^^^^^
+   |       ^^^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/param-attrs-builtin-attrs.rs:36:5
+error: expected non-macro attribute, found attribute macro `test`
+  --> $DIR/param-attrs-builtin-attrs.rs:36:7
    |
 LL |     #[test] a: u32,
-   |     ^^^^^^^
+   |       ^^^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/param-attrs-builtin-attrs.rs:56:9
+error: expected non-macro attribute, found attribute macro `test`
+  --> $DIR/param-attrs-builtin-attrs.rs:56:11
    |
 LL |         #[test] a: i32,
-   |         ^^^^^^^
+   |           ^^^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/param-attrs-builtin-attrs.rs:71:9
+error: expected non-macro attribute, found attribute macro `test`
+  --> $DIR/param-attrs-builtin-attrs.rs:71:11
    |
 LL |         #[test] a: i32,
-   |         ^^^^^^^
+   |           ^^^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/param-attrs-builtin-attrs.rs:92:9
+error: expected non-macro attribute, found attribute macro `test`
+  --> $DIR/param-attrs-builtin-attrs.rs:92:11
    |
 LL |         #[test] a: i32,
-   |         ^^^^^^^
+   |           ^^^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/param-attrs-builtin-attrs.rs:111:9
+error: expected non-macro attribute, found attribute macro `test`
+  --> $DIR/param-attrs-builtin-attrs.rs:111:11
    |
 LL |         #[test] a: i32,
-   |         ^^^^^^^
+   |           ^^^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/param-attrs-builtin-attrs.rs:126:9
+error: expected non-macro attribute, found attribute macro `test`
+  --> $DIR/param-attrs-builtin-attrs.rs:126:11
    |
 LL |         #[test] a: i32,
-   |         ^^^^^^^
+   |           ^^^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/param-attrs-builtin-attrs.rs:146:9
+error: expected non-macro attribute, found attribute macro `test`
+  --> $DIR/param-attrs-builtin-attrs.rs:146:11
    |
 LL |         #[test] a: i32,
-   |         ^^^^^^^
+   |           ^^^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/param-attrs-builtin-attrs.rs:163:9
+error: expected non-macro attribute, found attribute macro `test`
+  --> $DIR/param-attrs-builtin-attrs.rs:163:11
    |
 LL |         #[test] a: u32,
-   |         ^^^^^^^
+   |           ^^^^ not a non-macro attribute
 
 error: documentation comments cannot be applied to function parameters
   --> $DIR/param-attrs-builtin-attrs.rs:3:9
diff --git a/src/test/ui/rfc-2565-param-attrs/proc-macro-cannot-be-used.rs b/src/test/ui/rfc-2565-param-attrs/proc-macro-cannot-be-used.rs
index be9085d5878..fcfa610ec85 100644
--- a/src/test/ui/rfc-2565-param-attrs/proc-macro-cannot-be-used.rs
+++ b/src/test/ui/rfc-2565-param-attrs/proc-macro-cannot-be-used.rs
@@ -8,58 +8,58 @@ use ident_mac::id;
 struct W(u8);
 
 extern "C" { fn ffi(#[id] arg1: i32, #[id] ...); }
-//~^ ERROR expected an inert attribute, found an attribute macro
-//~| ERROR expected an inert attribute, found an attribute macro
+//~^ ERROR expected non-macro attribute, found attribute macro
+//~| ERROR expected non-macro attribute, found attribute macro
 
 unsafe extern "C" fn cvar(arg1: i32, #[id] mut args: ...) {}
-//~^ ERROR expected an inert attribute, found an attribute macro
+//~^ ERROR expected non-macro attribute, found attribute macro
 
 type Alias = extern "C" fn(#[id] u8, #[id] ...);
-    //~^ ERROR expected an inert attribute, found an attribute macro
-    //~| ERROR expected an inert attribute, found an attribute macro
+    //~^ ERROR expected non-macro attribute, found attribute macro
+    //~| ERROR expected non-macro attribute, found attribute macro
 
 fn free(#[id] arg1: u8) {
-    //~^ ERROR expected an inert attribute, found an attribute macro
+    //~^ ERROR expected non-macro attribute, found attribute macro
     let lam = |#[id] W(x), #[id] y: usize| ();
-    //~^ ERROR expected an inert attribute, found an attribute macro
-    //~| ERROR expected an inert attribute, found an attribute macro
+    //~^ ERROR expected non-macro attribute, found attribute macro
+    //~| ERROR expected non-macro attribute, found attribute macro
 }
 
 impl W {
     fn inherent1(#[id] self, #[id] arg1: u8) {}
-    //~^ ERROR expected an inert attribute, found an attribute macro
-    //~| ERROR expected an inert attribute, found an attribute macro
+    //~^ ERROR expected non-macro attribute, found attribute macro
+    //~| ERROR expected non-macro attribute, found attribute macro
     fn inherent2(#[id] &self, #[id] arg1: u8) {}
-    //~^ ERROR expected an inert attribute, found an attribute macro
-    //~| ERROR expected an inert attribute, found an attribute macro
+    //~^ ERROR expected non-macro attribute, found attribute macro
+    //~| ERROR expected non-macro attribute, found attribute macro
     fn inherent3<'a>(#[id] &'a mut self, #[id] arg1: u8) {}
-    //~^ ERROR expected an inert attribute, found an attribute macro
-    //~| ERROR expected an inert attribute, found an attribute macro
+    //~^ ERROR expected non-macro attribute, found attribute macro
+    //~| ERROR expected non-macro attribute, found attribute macro
     fn inherent4<'a>(#[id] self: Box<Self>, #[id] arg1: u8) {}
-    //~^ ERROR expected an inert attribute, found an attribute macro
-    //~| ERROR expected an inert attribute, found an attribute macro
+    //~^ ERROR expected non-macro attribute, found attribute macro
+    //~| ERROR expected non-macro attribute, found attribute macro
     fn issue_64682_associated_fn<'a>(#[id] arg1: u8, #[id] arg2: u8) {}
-    //~^ ERROR expected an inert attribute, found an attribute macro
-    //~| ERROR expected an inert attribute, found an attribute macro
+    //~^ ERROR expected non-macro attribute, found attribute macro
+    //~| ERROR expected non-macro attribute, found attribute macro
 }
 
 trait A {
     fn trait1(#[id] self, #[id] arg1: u8);
-    //~^ ERROR expected an inert attribute, found an attribute macro
-    //~| ERROR expected an inert attribute, found an attribute macro
+    //~^ ERROR expected non-macro attribute, found attribute macro
+    //~| ERROR expected non-macro attribute, found attribute macro
     fn trait2(#[id] &self, #[id] arg1: u8);
-    //~^ ERROR expected an inert attribute, found an attribute macro
-    //~| ERROR expected an inert attribute, found an attribute macro
+    //~^ ERROR expected non-macro attribute, found attribute macro
+    //~| ERROR expected non-macro attribute, found attribute macro
     fn trait3<'a>(#[id] &'a mut self, #[id] arg1: u8);
-    //~^ ERROR expected an inert attribute, found an attribute macro
-    //~| ERROR expected an inert attribute, found an attribute macro
+    //~^ ERROR expected non-macro attribute, found attribute macro
+    //~| ERROR expected non-macro attribute, found attribute macro
     fn trait4<'a>(#[id] self: Box<Self>, #[id] arg1: u8, #[id] Vec<u8>);
-    //~^ ERROR expected an inert attribute, found an attribute macro
-    //~| ERROR expected an inert attribute, found an attribute macro
-    //~| ERROR expected an inert attribute, found an attribute macro
+    //~^ ERROR expected non-macro attribute, found attribute macro
+    //~| ERROR expected non-macro attribute, found attribute macro
+    //~| ERROR expected non-macro attribute, found attribute macro
     fn issue_64682_associated_fn<'a>(#[id] arg1: u8, #[id] arg2: u8);
-    //~^ ERROR expected an inert attribute, found an attribute macro
-    //~| ERROR expected an inert attribute, found an attribute macro
+    //~^ ERROR expected non-macro attribute, found attribute macro
+    //~| ERROR expected non-macro attribute, found attribute macro
 }
 
 fn main() {}
diff --git a/src/test/ui/rfc-2565-param-attrs/proc-macro-cannot-be-used.stderr b/src/test/ui/rfc-2565-param-attrs/proc-macro-cannot-be-used.stderr
index 1cc3c3d8228..38c5050f342 100644
--- a/src/test/ui/rfc-2565-param-attrs/proc-macro-cannot-be-used.stderr
+++ b/src/test/ui/rfc-2565-param-attrs/proc-macro-cannot-be-used.stderr
@@ -1,176 +1,176 @@
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:10:21
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:10:23
    |
 LL | extern "C" { fn ffi(#[id] arg1: i32, #[id] ...); }
-   |                     ^^^^^
+   |                       ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:10:38
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:10:40
    |
 LL | extern "C" { fn ffi(#[id] arg1: i32, #[id] ...); }
-   |                                      ^^^^^
+   |                                        ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:14:38
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:14:40
    |
 LL | unsafe extern "C" fn cvar(arg1: i32, #[id] mut args: ...) {}
-   |                                      ^^^^^
+   |                                        ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:17:28
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:17:30
    |
 LL | type Alias = extern "C" fn(#[id] u8, #[id] ...);
-   |                            ^^^^^
+   |                              ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:17:38
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:17:40
    |
 LL | type Alias = extern "C" fn(#[id] u8, #[id] ...);
-   |                                      ^^^^^
+   |                                        ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:21:9
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:21:11
    |
 LL | fn free(#[id] arg1: u8) {
-   |         ^^^^^
+   |           ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:23:16
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:23:18
    |
 LL |     let lam = |#[id] W(x), #[id] y: usize| ();
-   |                ^^^^^
+   |                  ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:23:28
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:23:30
    |
 LL |     let lam = |#[id] W(x), #[id] y: usize| ();
-   |                            ^^^^^
+   |                              ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:29:18
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:29:20
    |
 LL |     fn inherent1(#[id] self, #[id] arg1: u8) {}
-   |                  ^^^^^
+   |                    ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:29:30
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:29:32
    |
 LL |     fn inherent1(#[id] self, #[id] arg1: u8) {}
-   |                              ^^^^^
+   |                                ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:32:18
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:32:20
    |
 LL |     fn inherent2(#[id] &self, #[id] arg1: u8) {}
-   |                  ^^^^^
+   |                    ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:32:31
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:32:33
    |
 LL |     fn inherent2(#[id] &self, #[id] arg1: u8) {}
-   |                               ^^^^^
+   |                                 ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:35:22
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:35:24
    |
 LL |     fn inherent3<'a>(#[id] &'a mut self, #[id] arg1: u8) {}
-   |                      ^^^^^
+   |                        ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:35:42
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:35:44
    |
 LL |     fn inherent3<'a>(#[id] &'a mut self, #[id] arg1: u8) {}
-   |                                          ^^^^^
+   |                                            ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:38:22
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:38:24
    |
 LL |     fn inherent4<'a>(#[id] self: Box<Self>, #[id] arg1: u8) {}
-   |                      ^^^^^
+   |                        ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:38:45
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:38:47
    |
 LL |     fn inherent4<'a>(#[id] self: Box<Self>, #[id] arg1: u8) {}
-   |                                             ^^^^^
+   |                                               ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:41:38
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:41:40
    |
 LL |     fn issue_64682_associated_fn<'a>(#[id] arg1: u8, #[id] arg2: u8) {}
-   |                                      ^^^^^
+   |                                        ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:41:54
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:41:56
    |
 LL |     fn issue_64682_associated_fn<'a>(#[id] arg1: u8, #[id] arg2: u8) {}
-   |                                                      ^^^^^
+   |                                                        ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:47:15
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:47:17
    |
 LL |     fn trait1(#[id] self, #[id] arg1: u8);
-   |               ^^^^^
+   |                 ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:47:27
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:47:29
    |
 LL |     fn trait1(#[id] self, #[id] arg1: u8);
-   |                           ^^^^^
+   |                             ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:50:15
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:50:17
    |
 LL |     fn trait2(#[id] &self, #[id] arg1: u8);
-   |               ^^^^^
+   |                 ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:50:28
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:50:30
    |
 LL |     fn trait2(#[id] &self, #[id] arg1: u8);
-   |                            ^^^^^
+   |                              ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:53:19
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:53:21
    |
 LL |     fn trait3<'a>(#[id] &'a mut self, #[id] arg1: u8);
-   |                   ^^^^^
+   |                     ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:53:39
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:53:41
    |
 LL |     fn trait3<'a>(#[id] &'a mut self, #[id] arg1: u8);
-   |                                       ^^^^^
+   |                                         ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:56:19
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:56:21
    |
 LL |     fn trait4<'a>(#[id] self: Box<Self>, #[id] arg1: u8, #[id] Vec<u8>);
-   |                   ^^^^^
+   |                     ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:56:42
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:56:44
    |
 LL |     fn trait4<'a>(#[id] self: Box<Self>, #[id] arg1: u8, #[id] Vec<u8>);
-   |                                          ^^^^^
+   |                                            ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:56:58
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:56:60
    |
 LL |     fn trait4<'a>(#[id] self: Box<Self>, #[id] arg1: u8, #[id] Vec<u8>);
-   |                                                          ^^^^^
+   |                                                            ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:60:38
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:60:40
    |
 LL |     fn issue_64682_associated_fn<'a>(#[id] arg1: u8, #[id] arg2: u8);
-   |                                      ^^^^^
+   |                                        ^^ not a non-macro attribute
 
-error: expected an inert attribute, found an attribute macro
-  --> $DIR/proc-macro-cannot-be-used.rs:60:54
+error: expected non-macro attribute, found attribute macro `id`
+  --> $DIR/proc-macro-cannot-be-used.rs:60:56
    |
 LL |     fn issue_64682_associated_fn<'a>(#[id] arg1: u8, #[id] arg2: u8);
-   |                                                      ^^^^^
+   |                                                        ^^ not a non-macro attribute
 
 error: aborting due to 29 previous errors
 
diff --git a/src/test/ui/span/issue-36530.rs b/src/test/ui/span/issue-36530.rs
index 4776740d8de..70e04bf7ee6 100644
--- a/src/test/ui/span/issue-36530.rs
+++ b/src/test/ui/span/issue-36530.rs
@@ -6,7 +6,7 @@
 
 #[foo]
 mod foo {
-    #![foo] //~ ERROR non-builtin inner attributes are unstable
+    #![foo] //~ ERROR custom inner attributes are unstable
 }
 
 fn main() {}
diff --git a/src/test/ui/span/issue-36530.stderr b/src/test/ui/span/issue-36530.stderr
index 79b12590fc5..a998d7217a1 100644
--- a/src/test/ui/span/issue-36530.stderr
+++ b/src/test/ui/span/issue-36530.stderr
@@ -1,8 +1,8 @@
-error[E0658]: non-builtin inner attributes are unstable
-  --> $DIR/issue-36530.rs:9:5
+error[E0658]: custom inner attributes are unstable
+  --> $DIR/issue-36530.rs:9:8
    |
 LL |     #![foo]
-   |     ^^^^^^^
+   |        ^^^
    |
    = note: see issue #54726 <https://github.com/rust-lang/rust/issues/54726> for more information
    = help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable