]> git.proxmox.com Git - rustc.git/blame - src/test/ui/pattern/bindings-after-at/wild-before-at-syntactically-rejected.stderr
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / pattern / bindings-after-at / wild-before-at-syntactically-rejected.stderr
CommitLineData
dfeec247
XL
1error: pattern on wrong side of `@`
2 --> $DIR/wild-before-at-syntactically-rejected.rs:8:9
3 |
4LL | let _ @ a = 0;
5 | -^^^-
6 | | |
7 | | binding on the right, should be on the left
8 | pattern on the left, should be on the right
9 | help: switch the order: `a @ _`
10
11error: pattern on wrong side of `@`
12 --> $DIR/wild-before-at-syntactically-rejected.rs:10:9
13 |
14LL | let _ @ ref a = 0;
15 | -^^^-----
16 | | |
17 | | binding on the right, should be on the left
18 | pattern on the left, should be on the right
19 | help: switch the order: `ref a @ _`
20
21error: pattern on wrong side of `@`
22 --> $DIR/wild-before-at-syntactically-rejected.rs:12:9
23 |
24LL | let _ @ ref mut a = 0;
25 | -^^^---------
26 | | |
27 | | binding on the right, should be on the left
28 | pattern on the left, should be on the right
29 | help: switch the order: `ref mut a @ _`
30
31error: left-hand side of `@` must be a binding
32 --> $DIR/wild-before-at-syntactically-rejected.rs:14:9
33 |
34LL | let _ @ (a, .., b) = (0, 1, 2, 3);
35 | -^^^----------
36 | | |
37 | | also a pattern
38 | interpreted as a pattern, not a binding
39 |
40 = note: bindings are `x`, `mut x`, `ref x`, and `ref mut x`
41
42error: aborting due to 4 previous errors
43