fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.4 KiB32 linesraw
1error: `$x:pat` is followed by `|`, which is not allowed for `pat` fragments
2  --> $DIR/macro-pat-pattern-followed-by-or-in-2021.rs:3:28
3   |
4LL | macro_rules! foo { ($x:pat | $y:pat) => {} }
5   |                     ------ ^ not allowed after `pat` fragments
6   |                     |
7   |                     help: try a `pat_param` fragment specifier instead: `$x:pat_param`
8   |
9   = note: allowed there are: `=>`, `,`, `=`, `if` or `in`
10
11error: `$x:pat` is followed by `|`, which is not allowed for `pat` fragments
12  --> $DIR/macro-pat-pattern-followed-by-or-in-2021.rs:4:32
13   |
14LL | macro_rules! bar { ($($x:pat)+ | $($y:pat)+) => {} }
15   |                       ------   ^ not allowed after `pat` fragments
16   |                       |
17   |                       help: try a `pat_param` fragment specifier instead: `$x:pat_param`
18   |
19   = note: allowed there are: `=>`, `,`, `=`, `if` or `in`
20
21error: `$pat:pat` may be followed by `|`, which is not allowed for `pat` fragments
22  --> $DIR/macro-pat-pattern-followed-by-or-in-2021.rs:7:36
23   |
24LL |     ( $expr:expr , $( $( $pat:pat )|+ => $expr_arm:expr ),+ ) => {
25   |                          --------  ^ not allowed after `pat` fragments
26   |                          |
27   |                          help: try a `pat_param` fragment specifier instead: `$pat:pat_param`
28   |
29   = note: allowed there are: `=>`, `,`, `=`, `if` or `in`
30
31error: aborting due to 3 previous errors
32