about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authormark <markm@cs.wisc.edu>2021-04-14 20:34:51 -0500
committermark <markm@cs.wisc.edu>2021-04-15 13:52:09 -0500
commit0566ccc72fc49e0a30fedebca754c8cc10bb1a73 (patch)
tree08d06ef86b9bc74f0a1e5b2d21be6d004b899528 /src
parentebc4acee91dc9871d1c90f0d7a38aff0580dd18a (diff)
downloadrust-0566ccc72fc49e0a30fedebca754c8cc10bb1a73.tar.gz
rust-0566ccc72fc49e0a30fedebca754c8cc10bb1a73.zip
rename pat2015 to pat_param
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/feature-gates/feature-gate-edition_macro_pats.rs2
-rw-r--r--src/test/ui/macros/edition-macro-pats.rs2
-rw-r--r--src/test/ui/macros/macro-or-patterns-back-compat.fixed12
-rw-r--r--src/test/ui/macros/macro-or-patterns-back-compat.rs6
-rw-r--r--src/test/ui/macros/macro-or-patterns-back-compat.stderr10
5 files changed, 16 insertions, 16 deletions
diff --git a/src/test/ui/feature-gates/feature-gate-edition_macro_pats.rs b/src/test/ui/feature-gates/feature-gate-edition_macro_pats.rs
index e9f813f83ae..fdd8626c760 100644
--- a/src/test/ui/feature-gates/feature-gate-edition_macro_pats.rs
+++ b/src/test/ui/feature-gates/feature-gate-edition_macro_pats.rs
@@ -1,7 +1,7 @@
 // Feature gate test for `edition_macro_pats` feature.
 
 macro_rules! foo {
-    ($x:pat2015) => {}; // ok
+    ($x:pat_param) => {}; // ok
     ($x:pat2021) => {}; //~ERROR `pat2021` is unstable
 }
 
diff --git a/src/test/ui/macros/edition-macro-pats.rs b/src/test/ui/macros/edition-macro-pats.rs
index 58f92710305..963a9c01a3b 100644
--- a/src/test/ui/macros/edition-macro-pats.rs
+++ b/src/test/ui/macros/edition-macro-pats.rs
@@ -3,7 +3,7 @@
 #![feature(edition_macro_pats)]
 
 macro_rules! foo {
-    (a $x:pat2015) => {};
+    (a $x:pat_param) => {};
     (b $x:pat2021) => {};
 }
 
diff --git a/src/test/ui/macros/macro-or-patterns-back-compat.fixed b/src/test/ui/macros/macro-or-patterns-back-compat.fixed
index f089f0fda4e..e0bd4cdde24 100644
--- a/src/test/ui/macros/macro-or-patterns-back-compat.fixed
+++ b/src/test/ui/macros/macro-or-patterns-back-compat.fixed
@@ -3,13 +3,13 @@
 #![feature(edition_macro_pats)]
 #![deny(or_patterns_back_compat)]
 #![allow(unused_macros)]
-macro_rules! foo { ($x:pat2015 | $y:pat) => {} } //~ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
-macro_rules! bar { ($($x:pat2015)+ | $($y:pat)+) => {} } //~ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
-macro_rules! baz { ($x:pat2015 | $y:pat2015) => {} } // should be ok
-macro_rules! qux { ($x:pat2015 | $y:pat) => {} } // should be ok
-macro_rules! ogg { ($x:pat2015 | $y:pat2015) => {} } //~ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
+macro_rules! foo { ($x:pat_param | $y:pat) => {} } //~ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
+macro_rules! bar { ($($x:pat_param)+ | $($y:pat)+) => {} } //~ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
+macro_rules! baz { ($x:pat_param | $y:pat_param) => {} } // should be ok
+macro_rules! qux { ($x:pat_param | $y:pat) => {} } // should be ok
+macro_rules! ogg { ($x:pat_param | $y:pat_param) => {} } //~ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
 macro_rules! match_any {
-    ( $expr:expr , $( $( $pat:pat2015 )|+ => $expr_arm:expr ),+ ) => { //~ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
+    ( $expr:expr , $( $( $pat:pat_param )|+ => $expr_arm:expr ),+ ) => { //~ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
         match $expr {
             $(
                 $( $pat => $expr_arm, )+
diff --git a/src/test/ui/macros/macro-or-patterns-back-compat.rs b/src/test/ui/macros/macro-or-patterns-back-compat.rs
index 0252581d5f1..9ff072dc323 100644
--- a/src/test/ui/macros/macro-or-patterns-back-compat.rs
+++ b/src/test/ui/macros/macro-or-patterns-back-compat.rs
@@ -5,9 +5,9 @@
 #![allow(unused_macros)]
 macro_rules! foo { ($x:pat | $y:pat) => {} } //~ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
 macro_rules! bar { ($($x:pat)+ | $($y:pat)+) => {} } //~ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
-macro_rules! baz { ($x:pat2015 | $y:pat2015) => {} } // should be ok
-macro_rules! qux { ($x:pat2015 | $y:pat) => {} } // should be ok
-macro_rules! ogg { ($x:pat | $y:pat2015) => {} } //~ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
+macro_rules! baz { ($x:pat_param | $y:pat_param) => {} } // should be ok
+macro_rules! qux { ($x:pat_param | $y:pat) => {} } // should be ok
+macro_rules! ogg { ($x:pat | $y:pat_param) => {} } //~ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
 macro_rules! match_any {
     ( $expr:expr , $( $( $pat:pat )|+ => $expr_arm:expr ),+ ) => { //~ ERROR the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
         match $expr {
diff --git a/src/test/ui/macros/macro-or-patterns-back-compat.stderr b/src/test/ui/macros/macro-or-patterns-back-compat.stderr
index d8f19fa5807..970f62f6cff 100644
--- a/src/test/ui/macros/macro-or-patterns-back-compat.stderr
+++ b/src/test/ui/macros/macro-or-patterns-back-compat.stderr
@@ -2,7 +2,7 @@ error: the meaning of the `pat` fragment specifier is changing in Rust 2021, whi
   --> $DIR/macro-or-patterns-back-compat.rs:6:21
    |
 LL | macro_rules! foo { ($x:pat | $y:pat) => {} }
-   |                     ^^^^^^ help: use pat2015 to preserve semantics: `$x:pat2015`
+   |                     ^^^^^^ help: use pat_param to preserve semantics: `$x:pat_param`
    |
 note: the lint level is defined here
   --> $DIR/macro-or-patterns-back-compat.rs:4:9
@@ -14,19 +14,19 @@ error: the meaning of the `pat` fragment specifier is changing in Rust 2021, whi
   --> $DIR/macro-or-patterns-back-compat.rs:7:23
    |
 LL | macro_rules! bar { ($($x:pat)+ | $($y:pat)+) => {} }
-   |                       ^^^^^^ help: use pat2015 to preserve semantics: `$x:pat2015`
+   |                       ^^^^^^ help: use pat_param to preserve semantics: `$x:pat_param`
 
 error: the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
   --> $DIR/macro-or-patterns-back-compat.rs:10:21
    |
-LL | macro_rules! ogg { ($x:pat | $y:pat2015) => {} }
-   |                     ^^^^^^ help: use pat2015 to preserve semantics: `$x:pat2015`
+LL | macro_rules! ogg { ($x:pat | $y:pat_param) => {} }
+   |                     ^^^^^^ help: use pat_param to preserve semantics: `$x:pat_param`
 
 error: the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro
   --> $DIR/macro-or-patterns-back-compat.rs:12:26
    |
 LL |     ( $expr:expr , $( $( $pat:pat )|+ => $expr_arm:expr ),+ ) => {
-   |                          ^^^^^^^^ help: use pat2015 to preserve semantics: `$pat:pat2015`
+   |                          ^^^^^^^^ help: use pat_param to preserve semantics: `$pat:pat_param`
 
 error: aborting due to 4 previous errors