diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2020-11-19 01:49:20 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2020-11-19 19:25:20 +0300 |
| commit | 68f94e94ed3d80d768d0d107049f02fb99716dbe (patch) | |
| tree | 6762abfbf8b4355855072aeb25e6bdab73f150eb /src/test/ui/proc-macro | |
| parent | 69894ce9ac337e51730519e071c94a4bb9c926f2 (diff) | |
| download | rust-68f94e94ed3d80d768d0d107049f02fb99716dbe.tar.gz rust-68f94e94ed3d80d768d0d107049f02fb99716dbe.zip | |
resolve: Centralize some error reporting for unexpected macro resolutions
Diffstat (limited to 'src/test/ui/proc-macro')
| -rw-r--r-- | src/test/ui/proc-macro/proc-macro-gates.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/proc-macro/proc-macro-gates.stderr | 12 | ||||
| -rw-r--r-- | src/test/ui/proc-macro/proc-macro-gates2.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/proc-macro/proc-macro-gates2.stderr | 12 |
4 files changed, 16 insertions, 16 deletions
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 |
