@@ -45,11 +45,23 @@ LL | let mut mut x = 0;
45
45
help: remove the additional `mut`s
46
46
|
47
47
LL - let mut mut x = 0;
48
- LL + let mut x = 0;
48
+ LL + let mut x = 0;
49
+ |
50
+
51
+ error: `mut` on a binding may not be repeated
52
+ --> $DIR/mut-patterns.rs:18:13
53
+ |
54
+ LL | let mut mut mut mut mut x = 0;
55
+ | ^^^^^^^^^^^^^^^
56
+ |
57
+ help: remove the additional `mut`s
58
+ |
59
+ LL - let mut mut mut mut mut x = 0;
60
+ LL + let mut x = 0;
49
61
|
50
62
51
63
error: `mut` must be attached to each individual binding
52
- --> $DIR/mut-patterns.rs:19 :9
64
+ --> $DIR/mut-patterns.rs:23 :9
53
65
|
54
66
LL | let mut Foo { x: x } = Foo { x: 3 };
55
67
| ^^^^^^^^^^^^^^^^
@@ -61,7 +73,7 @@ LL | let Foo { x: mut x } = Foo { x: 3 };
61
73
| ~~~~~~~~~~~~~~~~
62
74
63
75
error: `mut` must be attached to each individual binding
64
- --> $DIR/mut-patterns.rs:23 :9
76
+ --> $DIR/mut-patterns.rs:27 :9
65
77
|
66
78
LL | let mut Foo { x } = Foo { x: 3 };
67
79
| ^^^^^^^^^^^^^
@@ -73,19 +85,19 @@ LL | let Foo { mut x } = Foo { x: 3 };
73
85
| ~~~~~~~~~~~~~
74
86
75
87
error: `mut` on a binding may not be repeated
76
- --> $DIR/mut-patterns.rs:28 :13
88
+ --> $DIR/mut-patterns.rs:32 :13
77
89
|
78
90
LL | let mut mut yield(become, await) = r#yield(0, 0);
79
91
| ^^^
80
92
|
81
93
help: remove the additional `mut`s
82
94
|
83
95
LL - let mut mut yield(become, await) = r#yield(0, 0);
84
- LL + let mut yield(become, await) = r#yield(0, 0);
96
+ LL + let mut yield(become, await) = r#yield(0, 0);
85
97
|
86
98
87
99
error: expected identifier, found reserved keyword `yield`
88
- --> $DIR/mut-patterns.rs:28 :17
100
+ --> $DIR/mut-patterns.rs:32 :17
89
101
|
90
102
LL | let mut mut yield(become, await) = r#yield(0, 0);
91
103
| ^^^^^ expected identifier, found reserved keyword
@@ -96,7 +108,7 @@ LL | let mut mut r#yield(become, await) = r#yield(0, 0);
96
108
| ++
97
109
98
110
error: expected identifier, found reserved keyword `become`
99
- --> $DIR/mut-patterns.rs:28 :23
111
+ --> $DIR/mut-patterns.rs:32 :23
100
112
|
101
113
LL | let mut mut yield(become, await) = r#yield(0, 0);
102
114
| ^^^^^^ expected identifier, found reserved keyword
@@ -107,7 +119,7 @@ LL | let mut mut yield(r#become, await) = r#yield(0, 0);
107
119
| ++
108
120
109
121
error: expected identifier, found keyword `await`
110
- --> $DIR/mut-patterns.rs:28 :31
122
+ --> $DIR/mut-patterns.rs:32 :31
111
123
|
112
124
LL | let mut mut yield(become, await) = r#yield(0, 0);
113
125
| ^^^^^ expected identifier, found keyword
@@ -118,7 +130,7 @@ LL | let mut mut yield(become, r#await) = r#yield(0, 0);
118
130
| ++
119
131
120
132
error: `mut` must be followed by a named binding
121
- --> $DIR/mut-patterns.rs:28 :9
133
+ --> $DIR/mut-patterns.rs:32 :9
122
134
|
123
135
LL | let mut mut yield(become, await) = r#yield(0, 0);
124
136
| ^^^^^^^^
@@ -131,7 +143,7 @@ LL + let yield(become, await) = r#yield(0, 0);
131
143
|
132
144
133
145
error: `mut` must be attached to each individual binding
134
- --> $DIR/mut-patterns.rs:37 :9
146
+ --> $DIR/mut-patterns.rs:41 :9
135
147
|
136
148
LL | let mut W(mut a, W(b, W(ref c, W(d, B { box f }))))
137
149
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -143,7 +155,7 @@ LL | let W(mut a, W(mut b, W(ref c, W(mut d, B { box mut f }))))
143
155
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
144
156
145
157
error: expected identifier, found `x`
146
- --> $DIR/mut-patterns.rs:44 :21
158
+ --> $DIR/mut-patterns.rs:48 :21
147
159
|
148
160
LL | let mut $p = 0;
149
161
| ^^ expected identifier
@@ -153,5 +165,5 @@ LL | foo!(x);
153
165
|
154
166
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
155
167
156
- error: aborting due to 13 previous errors
168
+ error: aborting due to 14 previous errors
157
169
0 commit comments