Skip to content

Commit eb944c1

Browse files
committed
test: add reasonable case
1 parent 7b14eda commit eb944c1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/test/ui/macros/macro-pat-pattern-followed-by-or-in-2021.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused_macros)]
33
macro_rules! foo { ($x:pat | $y:pat) => {} } //~ ERROR `$x:pat` is followed by `|`, which is not allowed for `pat` fragments
44
macro_rules! bar { ($($x:pat)+ | $($y:pat)+) => {} } //~ ERROR `$x:pat` is followed by `|`, which is not allowed for `pat` fragments
5-
macro_rules! qux { ($x:pat) => {} } // should be ok
5+
macro_rules! qux { ($x:pat, $y:pat) => {} } // should be ok
66
macro_rules! match_any {
77
( $expr:expr , $( $( $pat:pat )|+ => $expr_arm:expr ),+ ) => { //~ ERROR `$pat:pat` may be followed by `|`, which is not allowed for `pat` fragments
88
match $expr {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(unused_macros)]
33
macro_rules! foo { ($x:pat | $y:pat) => {} } // should be ok
44
macro_rules! bar { ($($x:pat)+ | $($y:pat)+) => {} } // should be ok
5-
macro_rules! qux { ($x:pat) => {} } // should be ok
5+
macro_rules! qux { ($x:pat, $y:pat) => {} } // should be ok
66
macro_rules! match_any {
77
( $expr:expr , $( $( $pat:pat )|+ => $expr_arm:expr ),+ ) => { // should be ok
88
match $expr {

0 commit comments

Comments
 (0)