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