From 3f7b98ebe0238e3bacbeedc57c76d825eabc689c Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 15 Apr 2021 14:27:29 -0500 Subject: [PATCH] update test --- src/test/ui/macros/macro-pat2021-pattern-followed-by-or.rs | 6 +++--- .../ui/macros/macro-pat2021-pattern-followed-by-or.stderr | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/ui/macros/macro-pat2021-pattern-followed-by-or.rs b/src/test/ui/macros/macro-pat2021-pattern-followed-by-or.rs index edd3f3e7646..1b8189e0948 100644 --- a/src/test/ui/macros/macro-pat2021-pattern-followed-by-or.rs +++ b/src/test/ui/macros/macro-pat2021-pattern-followed-by-or.rs @@ -1,9 +1,9 @@ #![feature(edition_macro_pats)] #![allow(unused_macros)] macro_rules! foo { ($x:pat2021 | $y:pat2021) => {} } //~ ERROR `$x:pat2021` is followed by `|`, which is not allowed for `pat2021` fragments -macro_rules! baz { ($x:pat2015 | $y:pat2015) => {} } // should be ok -macro_rules! qux { ($x:pat2015 | $y:pat2021) => {} } // should be ok -macro_rules! ogg { ($x:pat2021 | $y:pat2015) => {} } //~ ERROR `$x:pat2021` is followed by `|`, which is not allowed for `pat2021` fragments +macro_rules! baz { ($x:pat_param | $y:pat_param) => {} } // should be ok +macro_rules! qux { ($x:pat_param | $y:pat2021) => {} } // should be ok +macro_rules! ogg { ($x:pat2021 | $y:pat_param) => {} } //~ ERROR `$x:pat2021` is followed by `|`, which is not allowed for `pat2021` fragments macro_rules! match_any { ( $expr:expr , $( $( $pat:pat2021 )|+ => $expr_arm:pat2021 ),+ ) => { //~ ERROR `$pat:pat2021` may be followed by `|`, which is not allowed for `pat2021` fragments match $expr { diff --git a/src/test/ui/macros/macro-pat2021-pattern-followed-by-or.stderr b/src/test/ui/macros/macro-pat2021-pattern-followed-by-or.stderr index fe0b40cd86e..e74e8870806 100644 --- a/src/test/ui/macros/macro-pat2021-pattern-followed-by-or.stderr +++ b/src/test/ui/macros/macro-pat2021-pattern-followed-by-or.stderr @@ -9,7 +9,7 @@ LL | macro_rules! foo { ($x:pat2021 | $y:pat2021) => {} } error: `$x:pat2021` is followed by `|`, which is not allowed for `pat2021` fragments --> $DIR/macro-pat2021-pattern-followed-by-or.rs:6:32 | -LL | macro_rules! ogg { ($x:pat2021 | $y:pat2015) => {} } +LL | macro_rules! ogg { ($x:pat2021 | $y:pat_param) => {} } | ^ not allowed after `pat2021` fragments | = note: allowed there are: `=>`, `,`, `=`, `if` or `in`