Skip to content

Commit 3f7b98e

Browse files
committed
update test
1 parent 0566ccc commit 3f7b98e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/test/ui/macros/macro-pat2021-pattern-followed-by-or.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#![feature(edition_macro_pats)]
22
#![allow(unused_macros)]
33
macro_rules! foo { ($x:pat2021 | $y:pat2021) => {} } //~ ERROR `$x:pat2021` is followed by `|`, which is not allowed for `pat2021` fragments
4-
macro_rules! baz { ($x:pat2015 | $y:pat2015) => {} } // should be ok
5-
macro_rules! qux { ($x:pat2015 | $y:pat2021) => {} } // should be ok
6-
macro_rules! ogg { ($x:pat2021 | $y:pat2015) => {} } //~ ERROR `$x:pat2021` is followed by `|`, which is not allowed for `pat2021` fragments
4+
macro_rules! baz { ($x:pat_param | $y:pat_param) => {} } // should be ok
5+
macro_rules! qux { ($x:pat_param | $y:pat2021) => {} } // should be ok
6+
macro_rules! ogg { ($x:pat2021 | $y:pat_param) => {} } //~ ERROR `$x:pat2021` is followed by `|`, which is not allowed for `pat2021` fragments
77
macro_rules! match_any {
88
( $expr:expr , $( $( $pat:pat2021 )|+ => $expr_arm:pat2021 ),+ ) => { //~ ERROR `$pat:pat2021` may be followed by `|`, which is not allowed for `pat2021` fragments
99
match $expr {

src/test/ui/macros/macro-pat2021-pattern-followed-by-or.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LL | macro_rules! foo { ($x:pat2021 | $y:pat2021) => {} }
99
error: `$x:pat2021` is followed by `|`, which is not allowed for `pat2021` fragments
1010
--> $DIR/macro-pat2021-pattern-followed-by-or.rs:6:32
1111
|
12-
LL | macro_rules! ogg { ($x:pat2021 | $y:pat2015) => {} }
12+
LL | macro_rules! ogg { ($x:pat2021 | $y:pat_param) => {} }
1313
| ^ not allowed after `pat2021` fragments
1414
|
1515
= note: allowed there are: `=>`, `,`, `=`, `if` or `in`

0 commit comments

Comments
 (0)