@@ -45,11 +45,23 @@ LL | let mut mut x = 0;
4545help: remove the additional `mut`s
4646 |
4747LL - 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;
4961 |
5062
5163error: `mut` must be attached to each individual binding
52- --> $DIR/mut-patterns.rs:19 :9
64+ --> $DIR/mut-patterns.rs:23 :9
5365 |
5466LL | let mut Foo { x: x } = Foo { x: 3 };
5567 | ^^^^^^^^^^^^^^^^
@@ -61,7 +73,7 @@ LL | let Foo { x: mut x } = Foo { x: 3 };
6173 | ~~~~~~~~~~~~~~~~
6274
6375error: `mut` must be attached to each individual binding
64- --> $DIR/mut-patterns.rs:23 :9
76+ --> $DIR/mut-patterns.rs:27 :9
6577 |
6678LL | let mut Foo { x } = Foo { x: 3 };
6779 | ^^^^^^^^^^^^^
@@ -73,19 +85,19 @@ LL | let Foo { mut x } = Foo { x: 3 };
7385 | ~~~~~~~~~~~~~
7486
7587error: `mut` on a binding may not be repeated
76- --> $DIR/mut-patterns.rs:28 :13
88+ --> $DIR/mut-patterns.rs:32 :13
7789 |
7890LL | let mut mut yield(become, await) = r#yield(0, 0);
7991 | ^^^
8092 |
8193help: remove the additional `mut`s
8294 |
8395LL - 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);
8597 |
8698
8799error: expected identifier, found reserved keyword `yield`
88- --> $DIR/mut-patterns.rs:28 :17
100+ --> $DIR/mut-patterns.rs:32 :17
89101 |
90102LL | let mut mut yield(become, await) = r#yield(0, 0);
91103 | ^^^^^ expected identifier, found reserved keyword
@@ -96,7 +108,7 @@ LL | let mut mut r#yield(become, await) = r#yield(0, 0);
96108 | ++
97109
98110error: expected identifier, found reserved keyword `become`
99- --> $DIR/mut-patterns.rs:28 :23
111+ --> $DIR/mut-patterns.rs:32 :23
100112 |
101113LL | let mut mut yield(become, await) = r#yield(0, 0);
102114 | ^^^^^^ expected identifier, found reserved keyword
@@ -107,7 +119,7 @@ LL | let mut mut yield(r#become, await) = r#yield(0, 0);
107119 | ++
108120
109121error: expected identifier, found keyword `await`
110- --> $DIR/mut-patterns.rs:28 :31
122+ --> $DIR/mut-patterns.rs:32 :31
111123 |
112124LL | let mut mut yield(become, await) = r#yield(0, 0);
113125 | ^^^^^ expected identifier, found keyword
@@ -118,7 +130,7 @@ LL | let mut mut yield(become, r#await) = r#yield(0, 0);
118130 | ++
119131
120132error: `mut` must be followed by a named binding
121- --> $DIR/mut-patterns.rs:28 :9
133+ --> $DIR/mut-patterns.rs:32 :9
122134 |
123135LL | let mut mut yield(become, await) = r#yield(0, 0);
124136 | ^^^^^^^^
@@ -131,7 +143,7 @@ LL + let yield(become, await) = r#yield(0, 0);
131143 |
132144
133145error: `mut` must be attached to each individual binding
134- --> $DIR/mut-patterns.rs:37 :9
146+ --> $DIR/mut-patterns.rs:41 :9
135147 |
136148LL | let mut W(mut a, W(b, W(ref c, W(d, B { box f }))))
137149 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -143,7 +155,7 @@ LL | let W(mut a, W(mut b, W(ref c, W(mut d, B { box mut f }))))
143155 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
144156
145157error: expected identifier, found `x`
146- --> $DIR/mut-patterns.rs:44 :21
158+ --> $DIR/mut-patterns.rs:48 :21
147159 |
148160LL | let mut $p = 0;
149161 | ^^ expected identifier
@@ -153,5 +165,5 @@ LL | foo!(x);
153165 |
154166 = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
155167
156- error: aborting due to 13 previous errors
168+ error: aborting due to 14 previous errors
157169
0 commit comments