]> git.proxmox.com Git - rustc.git/blob - src/test/ui/parser/mut-patterns.stderr
New upstream version 1.40.0+dfsg1
[rustc.git] / src / test / ui / parser / mut-patterns.stderr
1 error: `mut` must be followed by a named binding
2 --> $DIR/mut-patterns.rs:9:9
3 |
4 LL | let mut _ = 0;
5 | ^^^^^ help: remove the `mut` prefix: `_`
6 |
7 = note: `mut` may be followed by `variable` and `variable @ pattern`
8
9 error: `mut` must be followed by a named binding
10 --> $DIR/mut-patterns.rs:10:9
11 |
12 LL | let mut (_, _) = (0, 0);
13 | ^^^^^^^^^^ help: remove the `mut` prefix: `(_, _)`
14 |
15 = note: `mut` may be followed by `variable` and `variable @ pattern`
16
17 error: `mut` on a binding may not be repeated
18 --> $DIR/mut-patterns.rs:12:13
19 |
20 LL | let mut mut x = 0;
21 | ^^^ help: remove the additional `mut`s
22
23 error: `mut` must be attached to each individual binding
24 --> $DIR/mut-patterns.rs:17:9
25 |
26 LL | let mut Foo { x: x } = Foo { x: 3 };
27 | ^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `Foo { x: mut x }`
28 |
29 = note: `mut` may be followed by `variable` and `variable @ pattern`
30
31 error: `mut` must be attached to each individual binding
32 --> $DIR/mut-patterns.rs:21:9
33 |
34 LL | let mut Foo { x } = Foo { x: 3 };
35 | ^^^^^^^^^^^^^ help: add `mut` to each binding: `Foo { mut x }`
36 |
37 = note: `mut` may be followed by `variable` and `variable @ pattern`
38
39 error: `mut` on a binding may not be repeated
40 --> $DIR/mut-patterns.rs:26:13
41 |
42 LL | let mut mut yield(become, await) = r#yield(0, 0);
43 | ^^^ help: remove the additional `mut`s
44
45 error: expected identifier, found reserved keyword `yield`
46 --> $DIR/mut-patterns.rs:26:17
47 |
48 LL | let mut mut yield(become, await) = r#yield(0, 0);
49 | ^^^^^ expected identifier, found reserved keyword
50 |
51 help: you can escape reserved keywords to use them as identifiers
52 |
53 LL | let mut mut r#yield(become, await) = r#yield(0, 0);
54 | ^^^^^^^
55
56 error: expected identifier, found reserved keyword `become`
57 --> $DIR/mut-patterns.rs:26:23
58 |
59 LL | let mut mut yield(become, await) = r#yield(0, 0);
60 | ^^^^^^ expected identifier, found reserved keyword
61 |
62 help: you can escape reserved keywords to use them as identifiers
63 |
64 LL | let mut mut yield(r#become, await) = r#yield(0, 0);
65 | ^^^^^^^^
66
67 error: expected identifier, found keyword `await`
68 --> $DIR/mut-patterns.rs:26:31
69 |
70 LL | let mut mut yield(become, await) = r#yield(0, 0);
71 | ^^^^^ expected identifier, found keyword
72 |
73 help: you can escape reserved keywords to use them as identifiers
74 |
75 LL | let mut mut yield(become, r#await) = r#yield(0, 0);
76 | ^^^^^^^
77
78 error: `mut` must be attached to each individual binding
79 --> $DIR/mut-patterns.rs:26:9
80 |
81 LL | let mut mut yield(become, await) = r#yield(0, 0);
82 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `r#yield(mut r#become, mut r#await)`
83 |
84 = note: `mut` may be followed by `variable` and `variable @ pattern`
85
86 error: `mut` must be attached to each individual binding
87 --> $DIR/mut-patterns.rs:35:9
88 |
89 LL | let mut W(mut a, W(b, W(ref c, W(d, B { box f }))))
90 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `W(mut a, W(mut b, W(ref c, W(mut d, B { box mut f }))))`
91 |
92 = note: `mut` may be followed by `variable` and `variable @ pattern`
93
94 error: expected identifier, found `x`
95 --> $DIR/mut-patterns.rs:42:21
96 |
97 LL | let mut $p = 0;
98 | ^^ expected identifier
99 ...
100 LL | foo!(x);
101 | -------- in this macro invocation
102
103 error: aborting due to 12 previous errors
104