about summary refs log tree commit diff
path: root/src/test/ui/proc-macro
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2020-02-01 01:02:31 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2020-05-03 19:24:41 +0300
commit5c6f7b32aab683276d4feb1810244ccf72bda736 (patch)
tree6765de04bbb863b97ec196f41f3fdf0a9d26f14a /src/test/ui/proc-macro
parente5f35df2c6944b843b08369c4b2ff3bdb0beb2d2 (diff)
downloadrust-5c6f7b32aab683276d4feb1810244ccf72bda736.tar.gz
rust-5c6f7b32aab683276d4feb1810244ccf72bda736.zip
Stabilize fn-like proc macros in expression, pattern and statement positions
Diffstat (limited to 'src/test/ui/proc-macro')
-rw-r--r--src/test/ui/proc-macro/attr-invalid-exprs.rs7
-rw-r--r--src/test/ui/proc-macro/attr-invalid-exprs.stderr6
-rw-r--r--src/test/ui/proc-macro/auxiliary/count_compound_ops.rs2
-rw-r--r--src/test/ui/proc-macro/auxiliary/generate-dollar-ident.rs1
-rw-r--r--src/test/ui/proc-macro/auxiliary/hygiene_example_codegen.rs2
-rw-r--r--src/test/ui/proc-macro/auxiliary/mixed-site-span.rs1
-rw-r--r--src/test/ui/proc-macro/auxiliary/resolved-located-at.rs1
-rw-r--r--src/test/ui/proc-macro/bang-macro.rs2
-rw-r--r--src/test/ui/proc-macro/call-site.rs8
-rw-r--r--src/test/ui/proc-macro/count_compound_ops.rs2
-rw-r--r--src/test/ui/proc-macro/hygiene_example.rs6
-rw-r--r--src/test/ui/proc-macro/is-available.rs2
-rw-r--r--src/test/ui/proc-macro/lints_in_proc_macros.rs3
-rw-r--r--src/test/ui/proc-macro/lints_in_proc_macros.stderr2
-rw-r--r--src/test/ui/proc-macro/macro-use-bang.rs2
-rw-r--r--src/test/ui/proc-macro/mixed-site-span.rs2
-rw-r--r--src/test/ui/proc-macro/mixed-site-span.stderr8
-rw-r--r--src/test/ui/proc-macro/multispan.rs2
-rw-r--r--src/test/ui/proc-macro/multispan.stderr28
-rw-r--r--src/test/ui/proc-macro/negative-token.rs2
-rw-r--r--src/test/ui/proc-macro/parent-source-spans.rs3
-rw-r--r--src/test/ui/proc-macro/parent-source-spans.stderr42
-rw-r--r--src/test/ui/proc-macro/proc-macro-gates.rs11
-rw-r--r--src/test/ui/proc-macro/proc-macro-gates.stderr47
-rw-r--r--src/test/ui/proc-macro/resolved-located-at.rs2
-rw-r--r--src/test/ui/proc-macro/resolved-located-at.stderr4
-rw-r--r--src/test/ui/proc-macro/span-api-tests.rs5
-rw-r--r--src/test/ui/proc-macro/three-equals.rs3
-rw-r--r--src/test/ui/proc-macro/three-equals.stderr14
29 files changed, 66 insertions, 154 deletions
diff --git a/src/test/ui/proc-macro/attr-invalid-exprs.rs b/src/test/ui/proc-macro/attr-invalid-exprs.rs
index fab98f0ce5e..9dcffc3405e 100644
--- a/src/test/ui/proc-macro/attr-invalid-exprs.rs
+++ b/src/test/ui/proc-macro/attr-invalid-exprs.rs
@@ -1,8 +1,9 @@
-// aux-build:attr-stmt-expr.rs
-
 //! Attributes producing expressions in invalid locations
 
-#![feature(stmt_expr_attributes, proc_macro_hygiene)]
+// aux-build:attr-stmt-expr.rs
+
+#![feature(proc_macro_hygiene)]
+#![feature(stmt_expr_attributes)]
 
 extern crate attr_stmt_expr;
 use attr_stmt_expr::{duplicate, no_output};
diff --git a/src/test/ui/proc-macro/attr-invalid-exprs.stderr b/src/test/ui/proc-macro/attr-invalid-exprs.stderr
index 49fe0bd0fcf..bcb54df0eca 100644
--- a/src/test/ui/proc-macro/attr-invalid-exprs.stderr
+++ b/src/test/ui/proc-macro/attr-invalid-exprs.stderr
@@ -1,11 +1,11 @@
 error: expected expression, found end of macro arguments
-  --> $DIR/attr-invalid-exprs.rs:11:13
+  --> $DIR/attr-invalid-exprs.rs:12:13
    |
 LL |     let _ = #[no_output] "Hello, world!";
    |             ^^^^^^^^^^^^
 
 error: macro expansion ignores token `,` and any following
-  --> $DIR/attr-invalid-exprs.rs:14:13
+  --> $DIR/attr-invalid-exprs.rs:15:13
    |
 LL |     let _ = #[duplicate] "Hello, world!";
    |             ^^^^^^^^^^^^- help: you might be missing a semicolon here: `;`
@@ -15,7 +15,7 @@ LL |     let _ = #[duplicate] "Hello, world!";
    = note: the usage of `duplicate!` is likely invalid in expression context
 
 error: macro expansion ignores token `,` and any following
-  --> $DIR/attr-invalid-exprs.rs:23:9
+  --> $DIR/attr-invalid-exprs.rs:24:9
    |
 LL |         #[duplicate]
    |         ^^^^^^^^^^^^- help: you might be missing a semicolon here: `;`
diff --git a/src/test/ui/proc-macro/auxiliary/count_compound_ops.rs b/src/test/ui/proc-macro/auxiliary/count_compound_ops.rs
index e09622e48bf..3a656d6485e 100644
--- a/src/test/ui/proc-macro/auxiliary/count_compound_ops.rs
+++ b/src/test/ui/proc-macro/auxiliary/count_compound_ops.rs
@@ -1,7 +1,7 @@
 // force-host
 // no-prefer-dynamic
 
-#![feature(proc_macro_hygiene, proc_macro_quote)]
+#![feature(proc_macro_quote)]
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro;
diff --git a/src/test/ui/proc-macro/auxiliary/generate-dollar-ident.rs b/src/test/ui/proc-macro/auxiliary/generate-dollar-ident.rs
index c9f0664c3a3..3f3e12eed6c 100644
--- a/src/test/ui/proc-macro/auxiliary/generate-dollar-ident.rs
+++ b/src/test/ui/proc-macro/auxiliary/generate-dollar-ident.rs
@@ -1,7 +1,6 @@
 // force-host
 // no-prefer-dynamic
 
-#![feature(proc_macro_hygiene)]
 #![feature(proc_macro_quote)]
 #![crate_type = "proc-macro"]
 
diff --git a/src/test/ui/proc-macro/auxiliary/hygiene_example_codegen.rs b/src/test/ui/proc-macro/auxiliary/hygiene_example_codegen.rs
index 5e50a6e916f..2bd4d33360f 100644
--- a/src/test/ui/proc-macro/auxiliary/hygiene_example_codegen.rs
+++ b/src/test/ui/proc-macro/auxiliary/hygiene_example_codegen.rs
@@ -1,7 +1,7 @@
 // force-host
 // no-prefer-dynamic
 
-#![feature(proc_macro_quote, proc_macro_hygiene)]
+#![feature(proc_macro_quote)]
 #![crate_type = "proc-macro"]
 
 extern crate proc_macro as proc_macro_renamed; // This does not break `quote!`
diff --git a/src/test/ui/proc-macro/auxiliary/mixed-site-span.rs b/src/test/ui/proc-macro/auxiliary/mixed-site-span.rs
index c63006e7a40..c2a49870048 100644
--- a/src/test/ui/proc-macro/auxiliary/mixed-site-span.rs
+++ b/src/test/ui/proc-macro/auxiliary/mixed-site-span.rs
@@ -1,7 +1,6 @@
 // force-host
 // no-prefer-dynamic
 
-#![feature(proc_macro_hygiene)]
 #![feature(proc_macro_quote)]
 
 #![crate_type = "proc-macro"]
diff --git a/src/test/ui/proc-macro/auxiliary/resolved-located-at.rs b/src/test/ui/proc-macro/auxiliary/resolved-located-at.rs
index 9416c133e56..db660824fbb 100644
--- a/src/test/ui/proc-macro/auxiliary/resolved-located-at.rs
+++ b/src/test/ui/proc-macro/auxiliary/resolved-located-at.rs
@@ -3,7 +3,6 @@
 
 #![feature(proc_macro_def_site)]
 #![feature(proc_macro_diagnostic)]
-#![feature(proc_macro_hygiene)]
 #![feature(proc_macro_quote)]
 #![crate_type = "proc-macro"]
 
diff --git a/src/test/ui/proc-macro/bang-macro.rs b/src/test/ui/proc-macro/bang-macro.rs
index 7073c71538c..92810791314 100644
--- a/src/test/ui/proc-macro/bang-macro.rs
+++ b/src/test/ui/proc-macro/bang-macro.rs
@@ -1,8 +1,6 @@
 // run-pass
 // aux-build:bang-macro.rs
 
-#![feature(proc_macro_hygiene)]
-
 extern crate bang_macro;
 use bang_macro::rewrite;
 
diff --git a/src/test/ui/proc-macro/call-site.rs b/src/test/ui/proc-macro/call-site.rs
index 096d0ec533a..12c77250c0e 100644
--- a/src/test/ui/proc-macro/call-site.rs
+++ b/src/test/ui/proc-macro/call-site.rs
@@ -1,13 +1,7 @@
-// run-pass
-
-#![allow(unused_variables)]
-#![allow(unused_imports)]
+// check-pass
 // aux-build:call-site.rs
 
-#![feature(proc_macro_hygiene)]
-
 extern crate call_site;
-use call_site::*;
 
 fn main() {
     let x1 = 10;
diff --git a/src/test/ui/proc-macro/count_compound_ops.rs b/src/test/ui/proc-macro/count_compound_ops.rs
index 966ab616cdf..2cb87184488 100644
--- a/src/test/ui/proc-macro/count_compound_ops.rs
+++ b/src/test/ui/proc-macro/count_compound_ops.rs
@@ -1,8 +1,6 @@
 // run-pass
 // aux-build:count_compound_ops.rs
 
-#![feature(proc_macro_hygiene)]
-
 extern crate count_compound_ops;
 use count_compound_ops::count_compound_ops;
 
diff --git a/src/test/ui/proc-macro/hygiene_example.rs b/src/test/ui/proc-macro/hygiene_example.rs
index 56ea9daacc3..346ed1207cd 100644
--- a/src/test/ui/proc-macro/hygiene_example.rs
+++ b/src/test/ui/proc-macro/hygiene_example.rs
@@ -1,11 +1,7 @@
-// run-pass
-
-#![allow(unused_macros)]
+// check-pass
 // aux-build:hygiene_example_codegen.rs
 // aux-build:hygiene_example.rs
 
-#![feature(proc_macro_hygiene)]
-
 extern crate hygiene_example;
 use hygiene_example::hello;
 
diff --git a/src/test/ui/proc-macro/is-available.rs b/src/test/ui/proc-macro/is-available.rs
index 943d9fe797a..52f7e00d572 100644
--- a/src/test/ui/proc-macro/is-available.rs
+++ b/src/test/ui/proc-macro/is-available.rs
@@ -1,6 +1,6 @@
 // run-pass
 
-#![feature(proc_macro_hygiene, proc_macro_is_available)]
+#![feature(proc_macro_is_available)]
 
 extern crate proc_macro;
 
diff --git a/src/test/ui/proc-macro/lints_in_proc_macros.rs b/src/test/ui/proc-macro/lints_in_proc_macros.rs
index 8d2957ef5da..377a1f25b63 100644
--- a/src/test/ui/proc-macro/lints_in_proc_macros.rs
+++ b/src/test/ui/proc-macro/lints_in_proc_macros.rs
@@ -1,8 +1,5 @@
 // aux-build:bang_proc_macro2.rs
 
-#![feature(proc_macro_hygiene)]
-#![allow(unused_macros)]
-
 extern crate bang_proc_macro2;
 
 use bang_proc_macro2::bang_proc_macro2;
diff --git a/src/test/ui/proc-macro/lints_in_proc_macros.stderr b/src/test/ui/proc-macro/lints_in_proc_macros.stderr
index df9d7e1efe3..03c4d19268c 100644
--- a/src/test/ui/proc-macro/lints_in_proc_macros.stderr
+++ b/src/test/ui/proc-macro/lints_in_proc_macros.stderr
@@ -1,5 +1,5 @@
 error[E0425]: cannot find value `foobar2` in this scope
-  --> $DIR/lints_in_proc_macros.rs:12:5
+  --> $DIR/lints_in_proc_macros.rs:9:5
    |
 LL |     bang_proc_macro2!();
    |     ^^^^^^^^^^^^^^^^^^^^ help: a local variable with a similar name exists: `foobar`
diff --git a/src/test/ui/proc-macro/macro-use-bang.rs b/src/test/ui/proc-macro/macro-use-bang.rs
index 9d30f48846d..4a0bf0b2f63 100644
--- a/src/test/ui/proc-macro/macro-use-bang.rs
+++ b/src/test/ui/proc-macro/macro-use-bang.rs
@@ -1,8 +1,6 @@
 // build-pass (FIXME(62277): could be check-pass?)
 // aux-build:test-macros.rs
 
-#![feature(proc_macro_hygiene)]
-
 #[macro_use]
 extern crate test_macros;
 
diff --git a/src/test/ui/proc-macro/mixed-site-span.rs b/src/test/ui/proc-macro/mixed-site-span.rs
index 69c32a96ca0..0083846568e 100644
--- a/src/test/ui/proc-macro/mixed-site-span.rs
+++ b/src/test/ui/proc-macro/mixed-site-span.rs
@@ -2,8 +2,6 @@
 
 // aux-build:mixed-site-span.rs
 
-#![feature(proc_macro_hygiene)]
-
 #[macro_use]
 extern crate mixed_site_span;
 
diff --git a/src/test/ui/proc-macro/mixed-site-span.stderr b/src/test/ui/proc-macro/mixed-site-span.stderr
index 30a4cd7c116..c5ce8532d8b 100644
--- a/src/test/ui/proc-macro/mixed-site-span.stderr
+++ b/src/test/ui/proc-macro/mixed-site-span.stderr
@@ -1,5 +1,5 @@
 error[E0426]: use of undeclared label `'label_use`
-  --> $DIR/mixed-site-span.rs:15:9
+  --> $DIR/mixed-site-span.rs:13:9
    |
 LL |         proc_macro_rules!();
    |         ^^^^^^^^^^^^^^^^^^^^ undeclared label `'label_use`
@@ -7,7 +7,7 @@ LL |         proc_macro_rules!();
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `local_use` in this scope
-  --> $DIR/mixed-site-span.rs:15:9
+  --> $DIR/mixed-site-span.rs:13:9
    |
 LL |         proc_macro_rules!();
    |         ^^^^^^^^^^^^^^^^^^^^ not found in this scope
@@ -15,13 +15,13 @@ LL |         proc_macro_rules!();
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `local_def` in this scope
-  --> $DIR/mixed-site-span.rs:19:9
+  --> $DIR/mixed-site-span.rs:17:9
    |
 LL |         local_def;
    |         ^^^^^^^^^ not found in this scope
 
 error[E0412]: cannot find type `ItemUse` in crate `$crate`
-  --> $DIR/mixed-site-span.rs:26:1
+  --> $DIR/mixed-site-span.rs:24:1
    |
 LL | pass_dollar_crate!();
    | ^^^^^^^^^^^^^^^^^^^^^ not found in `$crate`
diff --git a/src/test/ui/proc-macro/multispan.rs b/src/test/ui/proc-macro/multispan.rs
index d06947761e3..e9e0349f2c2 100644
--- a/src/test/ui/proc-macro/multispan.rs
+++ b/src/test/ui/proc-macro/multispan.rs
@@ -1,7 +1,5 @@
 // aux-build:multispan.rs
 
-#![feature(proc_macro_hygiene)]
-
 extern crate multispan;
 
 use multispan::hello;
diff --git a/src/test/ui/proc-macro/multispan.stderr b/src/test/ui/proc-macro/multispan.stderr
index 4405278528e..8dc2f3d12af 100644
--- a/src/test/ui/proc-macro/multispan.stderr
+++ b/src/test/ui/proc-macro/multispan.stderr
@@ -1,89 +1,89 @@
 error: hello to you, too!
-  --> $DIR/multispan.rs:14:5
+  --> $DIR/multispan.rs:12:5
    |
 LL |     hello!(hi);
    |     ^^^^^^^^^^^
    |
 note: found these 'hi's
-  --> $DIR/multispan.rs:14:12
+  --> $DIR/multispan.rs:12:12
    |
 LL |     hello!(hi);
    |            ^^
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: hello to you, too!
-  --> $DIR/multispan.rs:17:5
+  --> $DIR/multispan.rs:15:5
    |
 LL |     hello!(hi hi);
    |     ^^^^^^^^^^^^^^
    |
 note: found these 'hi's
-  --> $DIR/multispan.rs:17:12
+  --> $DIR/multispan.rs:15:12
    |
 LL |     hello!(hi hi);
    |            ^^ ^^
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: hello to you, too!
-  --> $DIR/multispan.rs:20:5
+  --> $DIR/multispan.rs:18:5
    |
 LL |     hello!(hi hi hi);
    |     ^^^^^^^^^^^^^^^^^
    |
 note: found these 'hi's
-  --> $DIR/multispan.rs:20:12
+  --> $DIR/multispan.rs:18:12
    |
 LL |     hello!(hi hi hi);
    |            ^^ ^^ ^^
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: hello to you, too!
-  --> $DIR/multispan.rs:23:5
+  --> $DIR/multispan.rs:21:5
    |
 LL |     hello!(hi hey hi yo hi beep beep hi hi);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: found these 'hi's
-  --> $DIR/multispan.rs:23:12
+  --> $DIR/multispan.rs:21:12
    |
 LL |     hello!(hi hey hi yo hi beep beep hi hi);
    |            ^^     ^^    ^^           ^^ ^^
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: hello to you, too!
-  --> $DIR/multispan.rs:24:5
+  --> $DIR/multispan.rs:22:5
    |
 LL |     hello!(hi there, hi how are you? hi... hi.);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: found these 'hi's
-  --> $DIR/multispan.rs:24:12
+  --> $DIR/multispan.rs:22:12
    |
 LL |     hello!(hi there, hi how are you? hi... hi.);
    |            ^^        ^^              ^^    ^^
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: hello to you, too!
-  --> $DIR/multispan.rs:25:5
+  --> $DIR/multispan.rs:23:5
    |
 LL |     hello!(whoah. hi di hi di ho);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: found these 'hi's
-  --> $DIR/multispan.rs:25:19
+  --> $DIR/multispan.rs:23:19
    |
 LL |     hello!(whoah. hi di hi di ho);
    |                   ^^    ^^
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: hello to you, too!
-  --> $DIR/multispan.rs:26:5
+  --> $DIR/multispan.rs:24:5
    |
 LL |     hello!(hi good hi and good bye);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: found these 'hi's
-  --> $DIR/multispan.rs:26:12
+  --> $DIR/multispan.rs:24:12
    |
 LL |     hello!(hi good hi and good bye);
    |            ^^      ^^
diff --git a/src/test/ui/proc-macro/negative-token.rs b/src/test/ui/proc-macro/negative-token.rs
index 3d018fe60a1..2ed3cbc08cd 100644
--- a/src/test/ui/proc-macro/negative-token.rs
+++ b/src/test/ui/proc-macro/negative-token.rs
@@ -1,8 +1,6 @@
 // run-pass
 // aux-build:negative-token.rs
 
-#![feature(proc_macro_hygiene)]
-
 extern crate negative_token;
 
 use negative_token::*;
diff --git a/src/test/ui/proc-macro/parent-source-spans.rs b/src/test/ui/proc-macro/parent-source-spans.rs
index 7b2ffefb05b..354657db4db 100644
--- a/src/test/ui/proc-macro/parent-source-spans.rs
+++ b/src/test/ui/proc-macro/parent-source-spans.rs
@@ -1,5 +1,6 @@
 // aux-build:parent-source-spans.rs
-#![feature(decl_macro, proc_macro_hygiene)]
+
+#![feature(decl_macro)]
 
 extern crate parent_source_spans;
 
diff --git a/src/test/ui/proc-macro/parent-source-spans.stderr b/src/test/ui/proc-macro/parent-source-spans.stderr
index c7d15b43e89..45a3f31e3dd 100644
--- a/src/test/ui/proc-macro/parent-source-spans.stderr
+++ b/src/test/ui/proc-macro/parent-source-spans.stderr
@@ -1,5 +1,5 @@
 error: first final: "hello"
-  --> $DIR/parent-source-spans.rs:15:12
+  --> $DIR/parent-source-spans.rs:16:12
    |
 LL |     three!($a, $b);
    |            ^^
@@ -10,7 +10,7 @@ LL |     one!("hello", "world");
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: second final: "world"
-  --> $DIR/parent-source-spans.rs:15:16
+  --> $DIR/parent-source-spans.rs:16:16
    |
 LL |     three!($a, $b);
    |                ^^
@@ -21,7 +21,7 @@ LL |     one!("hello", "world");
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: first parent: "hello"
-  --> $DIR/parent-source-spans.rs:9:5
+  --> $DIR/parent-source-spans.rs:10:5
    |
 LL |     two!($a, $b);
    |     ^^^^^^^^^^^^^
@@ -32,7 +32,7 @@ LL |     one!("hello", "world");
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: second parent: "world"
-  --> $DIR/parent-source-spans.rs:9:5
+  --> $DIR/parent-source-spans.rs:10:5
    |
 LL |     two!($a, $b);
    |     ^^^^^^^^^^^^^
@@ -43,31 +43,31 @@ LL |     one!("hello", "world");
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: first grandparent: "hello"
-  --> $DIR/parent-source-spans.rs:35:5
+  --> $DIR/parent-source-spans.rs:36:5
    |
 LL |     one!("hello", "world");
    |     ^^^^^^^^^^^^^^^^^^^^^^^
 
 error: second grandparent: "world"
-  --> $DIR/parent-source-spans.rs:35:5
+  --> $DIR/parent-source-spans.rs:36:5
    |
 LL |     one!("hello", "world");
    |     ^^^^^^^^^^^^^^^^^^^^^^^
 
 error: first source: "hello"
-  --> $DIR/parent-source-spans.rs:35:5
+  --> $DIR/parent-source-spans.rs:36:5
    |
 LL |     one!("hello", "world");
    |     ^^^^^^^^^^^^^^^^^^^^^^^
 
 error: second source: "world"
-  --> $DIR/parent-source-spans.rs:35:5
+  --> $DIR/parent-source-spans.rs:36:5
    |
 LL |     one!("hello", "world");
    |     ^^^^^^^^^^^^^^^^^^^^^^^
 
 error: first final: "yay"
-  --> $DIR/parent-source-spans.rs:15:12
+  --> $DIR/parent-source-spans.rs:16:12
    |
 LL |     three!($a, $b);
    |            ^^
@@ -78,7 +78,7 @@ LL |     two!("yay", "rust");
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: second final: "rust"
-  --> $DIR/parent-source-spans.rs:15:16
+  --> $DIR/parent-source-spans.rs:16:16
    |
 LL |     three!($a, $b);
    |                ^^
@@ -89,55 +89,55 @@ LL |     two!("yay", "rust");
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: first parent: "yay"
-  --> $DIR/parent-source-spans.rs:41:5
+  --> $DIR/parent-source-spans.rs:42:5
    |
 LL |     two!("yay", "rust");
    |     ^^^^^^^^^^^^^^^^^^^^
 
 error: second parent: "rust"
-  --> $DIR/parent-source-spans.rs:41:5
+  --> $DIR/parent-source-spans.rs:42:5
    |
 LL |     two!("yay", "rust");
    |     ^^^^^^^^^^^^^^^^^^^^
 
 error: first source: "yay"
-  --> $DIR/parent-source-spans.rs:41:5
+  --> $DIR/parent-source-spans.rs:42:5
    |
 LL |     two!("yay", "rust");
    |     ^^^^^^^^^^^^^^^^^^^^
 
 error: second source: "rust"
-  --> $DIR/parent-source-spans.rs:41:5
+  --> $DIR/parent-source-spans.rs:42:5
    |
 LL |     two!("yay", "rust");
    |     ^^^^^^^^^^^^^^^^^^^^
 
 error: first final: "hip"
-  --> $DIR/parent-source-spans.rs:47:12
+  --> $DIR/parent-source-spans.rs:48:12
    |
 LL |     three!("hip", "hop");
    |            ^^^^^
 
 error: second final: "hop"
-  --> $DIR/parent-source-spans.rs:47:19
+  --> $DIR/parent-source-spans.rs:48:19
    |
 LL |     three!("hip", "hop");
    |                   ^^^^^
 
 error: first source: "hip"
-  --> $DIR/parent-source-spans.rs:47:12
+  --> $DIR/parent-source-spans.rs:48:12
    |
 LL |     three!("hip", "hop");
    |            ^^^^^
 
 error: second source: "hop"
-  --> $DIR/parent-source-spans.rs:47:19
+  --> $DIR/parent-source-spans.rs:48:19
    |
 LL |     three!("hip", "hop");
    |                   ^^^^^
 
 error[E0425]: cannot find value `ok` in this scope
-  --> $DIR/parent-source-spans.rs:28:5
+  --> $DIR/parent-source-spans.rs:29:5
    |
 LL |     parent_source_spans!($($tokens)*);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a tuple variant with a similar name exists: `Ok`
@@ -153,7 +153,7 @@ LL |     Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `ok` in this scope
-  --> $DIR/parent-source-spans.rs:28:5
+  --> $DIR/parent-source-spans.rs:29:5
    |
 LL |     parent_source_spans!($($tokens)*);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a tuple variant with a similar name exists: `Ok`
@@ -169,7 +169,7 @@ LL |     Ok(#[stable(feature = "rust1", since = "1.0.0")] T),
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0425]: cannot find value `ok` in this scope
-  --> $DIR/parent-source-spans.rs:28:5
+  --> $DIR/parent-source-spans.rs:29:5
    |
 LL |     parent_source_spans!($($tokens)*);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a tuple variant with a similar name exists: `Ok`
diff --git a/src/test/ui/proc-macro/proc-macro-gates.rs b/src/test/ui/proc-macro/proc-macro-gates.rs
index 5df6ac422ac..b3b677fa7ff 100644
--- a/src/test/ui/proc-macro/proc-macro-gates.rs
+++ b/src/test/ui/proc-macro/proc-macro-gates.rs
@@ -45,13 +45,4 @@ fn attrs() {
     //~^ ERROR: custom attributes cannot be applied to expressions
 }
 
-fn main() {
-    if let identity!(Some(_x)) = Some(3) {}
-    //~^ ERROR: procedural macros cannot be expanded to patterns
-
-    empty!(struct S;); //~ ERROR: procedural macros cannot be expanded to statements
-    empty!(let _x = 3;); //~ ERROR: procedural macros cannot be expanded to statements
-
-    let _x = identity!(3); //~ ERROR: procedural macros cannot be expanded to expressions
-    let _x = [empty!(3)]; //~ ERROR: procedural macros cannot be expanded to expressions
-}
+fn main() {}
diff --git a/src/test/ui/proc-macro/proc-macro-gates.stderr b/src/test/ui/proc-macro/proc-macro-gates.stderr
index a94274de9c1..c0343495531 100644
--- a/src/test/ui/proc-macro/proc-macro-gates.stderr
+++ b/src/test/ui/proc-macro/proc-macro-gates.stderr
@@ -76,51 +76,6 @@ LL |     let _x = #[identity_attr] println!();
    = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
    = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
 
-error[E0658]: procedural macros cannot be expanded to patterns
-  --> $DIR/proc-macro-gates.rs:49:12
-   |
-LL |     if let identity!(Some(_x)) = Some(3) {}
-   |            ^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
-   = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
-
-error[E0658]: procedural macros cannot be expanded to statements
-  --> $DIR/proc-macro-gates.rs:52:5
-   |
-LL |     empty!(struct S;);
-   |     ^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
-   = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
-
-error[E0658]: procedural macros cannot be expanded to statements
-  --> $DIR/proc-macro-gates.rs:53:5
-   |
-LL |     empty!(let _x = 3;);
-   |     ^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
-   = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
-
-error[E0658]: procedural macros cannot be expanded to expressions
-  --> $DIR/proc-macro-gates.rs:55:14
-   |
-LL |     let _x = identity!(3);
-   |              ^^^^^^^^^^^^
-   |
-   = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
-   = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
-
-error[E0658]: procedural macros cannot be expanded to expressions
-  --> $DIR/proc-macro-gates.rs:56:15
-   |
-LL |     let _x = [empty!(3)];
-   |               ^^^^^^^^^
-   |
-   = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
-   = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
-
-error: aborting due to 14 previous errors
+error: aborting due to 9 previous errors
 
 For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/proc-macro/resolved-located-at.rs b/src/test/ui/proc-macro/resolved-located-at.rs
index 9976284e222..b785573f203 100644
--- a/src/test/ui/proc-macro/resolved-located-at.rs
+++ b/src/test/ui/proc-macro/resolved-located-at.rs
@@ -1,7 +1,5 @@
 // aux-build:resolved-located-at.rs
 
-#![feature(proc_macro_hygiene)]
-
 #[macro_use]
 extern crate resolved_located_at;
 
diff --git a/src/test/ui/proc-macro/resolved-located-at.stderr b/src/test/ui/proc-macro/resolved-located-at.stderr
index 0df7ced27a7..e71e79514f2 100644
--- a/src/test/ui/proc-macro/resolved-located-at.stderr
+++ b/src/test/ui/proc-macro/resolved-located-at.stderr
@@ -1,5 +1,5 @@
 error: expected error
-  --> $DIR/resolved-located-at.rs:9:25
+  --> $DIR/resolved-located-at.rs:7:25
    |
 LL |     resolve_located_at!(a b)
    |                         ^
@@ -7,7 +7,7 @@ LL |     resolve_located_at!(a b)
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0308]: mismatched types
-  --> $DIR/resolved-located-at.rs:9:27
+  --> $DIR/resolved-located-at.rs:7:27
    |
 LL | fn main() {
    |           - expected `()` because of default return type
diff --git a/src/test/ui/proc-macro/span-api-tests.rs b/src/test/ui/proc-macro/span-api-tests.rs
index 5c0cbd77a8d..5c149e4a1e5 100644
--- a/src/test/ui/proc-macro/span-api-tests.rs
+++ b/src/test/ui/proc-macro/span-api-tests.rs
@@ -1,11 +1,8 @@
 // run-pass
+// ignore-pretty
 // aux-build:span-api-tests.rs
 // aux-build:span-test-macros.rs
 
-// ignore-pretty
-
-#![feature(proc_macro_hygiene)]
-
 #[macro_use]
 extern crate span_test_macros;
 
diff --git a/src/test/ui/proc-macro/three-equals.rs b/src/test/ui/proc-macro/three-equals.rs
index 50a144f7960..21b137c99a7 100644
--- a/src/test/ui/proc-macro/three-equals.rs
+++ b/src/test/ui/proc-macro/three-equals.rs
@@ -1,8 +1,5 @@
 // aux-build:three-equals.rs
 
-
-#![feature(proc_macro_hygiene)]
-
 extern crate three_equals;
 
 use three_equals::three_equals;
diff --git a/src/test/ui/proc-macro/three-equals.stderr b/src/test/ui/proc-macro/three-equals.stderr
index ca82a345345..33a8c762a94 100644
--- a/src/test/ui/proc-macro/three-equals.stderr
+++ b/src/test/ui/proc-macro/three-equals.stderr
@@ -1,5 +1,5 @@
 error: found 2 equal signs, need exactly 3
-  --> $DIR/three-equals.rs:15:5
+  --> $DIR/three-equals.rs:12:5
    |
 LL |     three_equals!(==);
    |     ^^^^^^^^^^^^^^^^^^
@@ -8,38 +8,38 @@ LL |     three_equals!(==);
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: expected EOF, found `=`.
-  --> $DIR/three-equals.rs:18:21
+  --> $DIR/three-equals.rs:15:21
    |
 LL |     three_equals!(=====);
    |                     ^^
    |
 note: last good input was here
-  --> $DIR/three-equals.rs:18:21
+  --> $DIR/three-equals.rs:15:21
    |
 LL |     three_equals!(=====);
    |                     ^^
    = help: input must be: `===`
 
 error: expected `=`, found `abc`.
-  --> $DIR/three-equals.rs:21:19
+  --> $DIR/three-equals.rs:18:19
    |
 LL |     three_equals!(abc);
    |                   ^^^
 
 error: expected `=`, found `!`.
-  --> $DIR/three-equals.rs:24:19
+  --> $DIR/three-equals.rs:21:19
    |
 LL |     three_equals!(!!);
    |                   ^
 
 error: expected EOF, found `a`.
-  --> $DIR/three-equals.rs:27:22
+  --> $DIR/three-equals.rs:24:22
    |
 LL |     three_equals!(===a);
    |                      ^
    |
 note: last good input was here
-  --> $DIR/three-equals.rs:27:21
+  --> $DIR/three-equals.rs:24:21
    |
 LL |     three_equals!(===a);
    |                     ^