]>
Commit | Line | Data |
---|---|---|
e1599b0c XL |
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 | ||
74b04a01 XL |
17 | error: `mut` must be attached to each individual binding |
18 | --> $DIR/mut-patterns.rs:12:9 | |
19 | | | |
20 | LL | let mut (x @ y) = 0; | |
21 | | ^^^^^^^^^^^ help: add `mut` to each binding: `(mut x @ mut y)` | |
22 | | | |
23 | = note: `mut` may be followed by `variable` and `variable @ pattern` | |
24 | ||
e1599b0c | 25 | error: `mut` on a binding may not be repeated |
74b04a01 | 26 | --> $DIR/mut-patterns.rs:14:13 |
e1599b0c XL |
27 | | |
28 | LL | let mut mut x = 0; | |
29 | | ^^^ help: remove the additional `mut`s | |
30 | ||
31 | error: `mut` must be attached to each individual binding | |
74b04a01 | 32 | --> $DIR/mut-patterns.rs:19:9 |
0bf4aa26 | 33 | | |
532ac7d7 | 34 | LL | let mut Foo { x: x } = Foo { x: 3 }; |
e1599b0c XL |
35 | | ^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `Foo { x: mut x }` |
36 | | | |
37 | = note: `mut` may be followed by `variable` and `variable @ pattern` | |
38 | ||
39 | error: `mut` must be attached to each individual binding | |
74b04a01 | 40 | --> $DIR/mut-patterns.rs:23:9 |
e1599b0c XL |
41 | | |
42 | LL | let mut Foo { x } = Foo { x: 3 }; | |
43 | | ^^^^^^^^^^^^^ help: add `mut` to each binding: `Foo { mut x }` | |
44 | | | |
45 | = note: `mut` may be followed by `variable` and `variable @ pattern` | |
46 | ||
47 | error: `mut` on a binding may not be repeated | |
74b04a01 | 48 | --> $DIR/mut-patterns.rs:28:13 |
e1599b0c XL |
49 | | |
50 | LL | let mut mut yield(become, await) = r#yield(0, 0); | |
51 | | ^^^ help: remove the additional `mut`s | |
52 | ||
53 | error: expected identifier, found reserved keyword `yield` | |
74b04a01 | 54 | --> $DIR/mut-patterns.rs:28:17 |
e1599b0c XL |
55 | | |
56 | LL | let mut mut yield(become, await) = r#yield(0, 0); | |
57 | | ^^^^^ expected identifier, found reserved keyword | |
e74abb32 | 58 | | |
e1599b0c XL |
59 | help: you can escape reserved keywords to use them as identifiers |
60 | | | |
61 | LL | let mut mut r#yield(become, await) = r#yield(0, 0); | |
62 | | ^^^^^^^ | |
63 | ||
64 | error: expected identifier, found reserved keyword `become` | |
74b04a01 | 65 | --> $DIR/mut-patterns.rs:28:23 |
e1599b0c XL |
66 | | |
67 | LL | let mut mut yield(become, await) = r#yield(0, 0); | |
68 | | ^^^^^^ expected identifier, found reserved keyword | |
e74abb32 | 69 | | |
e1599b0c XL |
70 | help: you can escape reserved keywords to use them as identifiers |
71 | | | |
72 | LL | let mut mut yield(r#become, await) = r#yield(0, 0); | |
73 | | ^^^^^^^^ | |
74 | ||
75 | error: expected identifier, found keyword `await` | |
74b04a01 | 76 | --> $DIR/mut-patterns.rs:28:31 |
e1599b0c XL |
77 | | |
78 | LL | let mut mut yield(become, await) = r#yield(0, 0); | |
79 | | ^^^^^ expected identifier, found keyword | |
e74abb32 | 80 | | |
e1599b0c XL |
81 | help: you can escape reserved keywords to use them as identifiers |
82 | | | |
83 | LL | let mut mut yield(become, r#await) = r#yield(0, 0); | |
84 | | ^^^^^^^ | |
85 | ||
86 | error: `mut` must be attached to each individual binding | |
74b04a01 | 87 | --> $DIR/mut-patterns.rs:28:9 |
e1599b0c XL |
88 | | |
89 | LL | let mut mut yield(become, await) = r#yield(0, 0); | |
90 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `r#yield(mut r#become, mut r#await)` | |
91 | | | |
92 | = note: `mut` may be followed by `variable` and `variable @ pattern` | |
93 | ||
94 | error: `mut` must be attached to each individual binding | |
74b04a01 | 95 | --> $DIR/mut-patterns.rs:37:9 |
e1599b0c XL |
96 | | |
97 | LL | let mut W(mut a, W(b, W(ref c, W(d, B { box f })))) | |
98 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: add `mut` to each binding: `W(mut a, W(mut b, W(ref c, W(mut d, B { box mut f }))))` | |
99 | | | |
100 | = note: `mut` may be followed by `variable` and `variable @ pattern` | |
101 | ||
102 | error: expected identifier, found `x` | |
74b04a01 | 103 | --> $DIR/mut-patterns.rs:44:21 |
e1599b0c XL |
104 | | |
105 | LL | let mut $p = 0; | |
106 | | ^^ expected identifier | |
107 | ... | |
108 | LL | foo!(x); | |
109 | | -------- in this macro invocation | |
74b04a01 | 110 | | |
17df50a5 | 111 | = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) |
0bf4aa26 | 112 | |
74b04a01 | 113 | error: aborting due to 13 previous errors |
0bf4aa26 | 114 |