@@ -2,23 +2,29 @@ error: `$x:pat` is followed by `|`, which is not allowed for `pat` fragments
2
2
--> $DIR/macro-pat2021-pattern-followed-by-or.rs:4:28
3
3
|
4
4
LL | macro_rules! foo { ($x:pat | $y:pat) => {} }
5
- | ^ not allowed after `pat` fragments
5
+ | ------ ^ not allowed after `pat` fragments
6
+ | |
7
+ | help: try a `pat_param` fragment specifier instead: `$x:pat_param`
6
8
|
7
9
= note: allowed there are: `=>`, `,`, `=`, `if` or `in`
8
10
9
11
error: `$x:pat` is followed by `|`, which is not allowed for `pat` fragments
10
12
--> $DIR/macro-pat2021-pattern-followed-by-or.rs:7:28
11
13
|
12
14
LL | macro_rules! ogg { ($x:pat | $y:pat_param) => {} }
13
- | ^ not allowed after `pat` fragments
15
+ | ------ ^ not allowed after `pat` fragments
16
+ | |
17
+ | help: try a `pat_param` fragment specifier instead: `$x:pat_param`
14
18
|
15
19
= note: allowed there are: `=>`, `,`, `=`, `if` or `in`
16
20
17
21
error: `$pat:pat` may be followed by `|`, which is not allowed for `pat` fragments
18
22
--> $DIR/macro-pat2021-pattern-followed-by-or.rs:9:35
19
23
|
20
24
LL | ( $expr:expr , $( $( $pat:pat)|+ => $expr_arm:pat),+ ) => {
21
- | ^ not allowed after `pat` fragments
25
+ | -------- ^ not allowed after `pat` fragments
26
+ | |
27
+ | help: try a `pat_param` fragment specifier instead: `$pat:pat_param`
22
28
|
23
29
= note: allowed there are: `=>`, `,`, `=`, `if` or `in`
24
30
0 commit comments