update test
This commit is contained in:
parent
0566ccc72f
commit
3f7b98ebe0
@ -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 {
|
||||
|
@ -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`
|
||||
|
Loading…
x
Reference in New Issue
Block a user