update test
This commit is contained in:
parent
0566ccc72f
commit
3f7b98ebe0
2 changed files with 4 additions and 4 deletions
|
@ -1,9 +1,9 @@
|
||||||
#![feature(edition_macro_pats)]
|
#![feature(edition_macro_pats)]
|
||||||
#![allow(unused_macros)]
|
#![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! 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! baz { ($x:pat_param | $y:pat_param) => {} } // should be ok
|
||||||
macro_rules! qux { ($x:pat2015 | $y:pat2021) => {} } // should be ok
|
macro_rules! qux { ($x:pat_param | $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! ogg { ($x:pat2021 | $y:pat_param) => {} } //~ ERROR `$x:pat2021` is followed by `|`, which is not allowed for `pat2021` fragments
|
||||||
macro_rules! match_any {
|
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
|
( $expr:expr , $( $( $pat:pat2021 )|+ => $expr_arm:pat2021 ),+ ) => { //~ ERROR `$pat:pat2021` may be followed by `|`, which is not allowed for `pat2021` fragments
|
||||||
match $expr {
|
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
|
error: `$x:pat2021` is followed by `|`, which is not allowed for `pat2021` fragments
|
||||||
--> $DIR/macro-pat2021-pattern-followed-by-or.rs:6:32
|
--> $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
|
| ^ not allowed after `pat2021` fragments
|
||||||
|
|
|
|
||||||
= note: allowed there are: `=>`, `,`, `=`, `if` or `in`
|
= note: allowed there are: `=>`, `,`, `=`, `if` or `in`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue