@@ -35,16 +35,16 @@ LL | if let Some(&Some(&_)) = &mut Some(&Some(0)) {
3535 | ~
3636
3737error[E0308]: mismatched types
38- --> $DIR/pattern-errors.rs:32:29
38+ --> $DIR/pattern-errors.rs:32:28
3939 |
40- LL | if let Some(&Some(Some(( &mut _) ))) = &Some(Some(&mut Some(0))) {
41- | ^^^^^
40+ LL | if let Some(&Some(Some(&mut _))) = &Some(Some(&mut Some(0))) {
41+ | ^^^^^
4242 |
4343 = note: cannot match inherited `&` with `&mut` pattern
4444help: replace this `&mut` pattern with `&`
4545 |
46- LL | if let Some(&Some(Some((&_) ))) = &Some(Some(&mut Some(0))) {
47- | ~
46+ LL | if let Some(&Some(Some(&_ ))) = &Some(Some(&mut Some(0))) {
47+ | ~
4848
4949error[E0308]: mismatched types
5050 --> $DIR/pattern-errors.rs:35:17
@@ -59,19 +59,7 @@ LL | if let Some(&Some(x)) = &Some(Some(0)) {
5959 | ~
6060
6161error[E0308]: mismatched types
62- --> $DIR/pattern-errors.rs:38:17
63- |
64- LL | if let Some(&mut Some(x)) = &Some(Some(0)) {
65- | ^^^^^
66- |
67- = note: cannot match inherited `&` with `&mut` pattern
68- help: replace this `&mut` pattern with `&`
69- |
70- LL | if let Some(&Some(x)) = &Some(Some(0)) {
71- | ~
72-
73- error[E0308]: mismatched types
74- --> $DIR/pattern-errors.rs:44:11
62+ --> $DIR/pattern-errors.rs:41:11
7563 |
7664LL | let &[&mut x] = &&mut [0];
7765 | ^^^^^
@@ -83,7 +71,7 @@ LL | let &[&x] = &&mut [0];
8371 | ~
8472
8573error[E0308]: mismatched types
86- --> $DIR/pattern-errors.rs:49 :11
74+ --> $DIR/pattern-errors.rs:46 :11
8775 |
8876LL | let &[&mut x] = &mut &mut [0];
8977 | ^^^^^
@@ -95,7 +83,7 @@ LL | let &[&x] = &mut &mut [0];
9583 | ~
9684
9785error[E0308]: mismatched types
98- --> $DIR/pattern-errors.rs:54 :11
86+ --> $DIR/pattern-errors.rs:51 :11
9987 |
10088LL | let &[&mut ref x] = &&mut [0];
10189 | ^^^^^
@@ -107,7 +95,7 @@ LL | let &[&ref x] = &&mut [0];
10795 | ~
10896
10997error[E0308]: mismatched types
110- --> $DIR/pattern-errors.rs:59 :11
98+ --> $DIR/pattern-errors.rs:56 :11
11199 |
112100LL | let &[&mut ref x] = &mut &mut [0];
113101 | ^^^^^
@@ -119,7 +107,7 @@ LL | let &[&ref x] = &mut &mut [0];
119107 | ~
120108
121109error[E0308]: mismatched types
122- --> $DIR/pattern-errors.rs:64 :11
110+ --> $DIR/pattern-errors.rs:61 :11
123111 |
124112LL | let &[&mut mut x] = &&mut [0];
125113 | ^^^^^
@@ -131,7 +119,7 @@ LL | let &[&mut x] = &&mut [0];
131119 | ~
132120
133121error[E0308]: mismatched types
134- --> $DIR/pattern-errors.rs:69 :11
122+ --> $DIR/pattern-errors.rs:66 :11
135123 |
136124LL | let &[&mut mut x] = &mut &mut [0];
137125 | ^^^^^
@@ -143,7 +131,7 @@ LL | let &[&mut x] = &mut &mut [0];
143131 | ~
144132
145133error[E0658]: binding cannot be both mutable and by-reference
146- --> $DIR/pattern-errors.rs:76 :12
134+ --> $DIR/pattern-errors.rs:73 :12
147135 |
148136LL | let [&(mut x)] = &[&0];
149137 | ^^^^
@@ -153,7 +141,7 @@ LL | let [&(mut x)] = &[&0];
153141 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
154142
155143error[E0658]: binding cannot be both mutable and by-reference
156- --> $DIR/pattern-errors.rs:80 :12
144+ --> $DIR/pattern-errors.rs:77 :12
157145 |
158146LL | let [&(mut x)] = &mut [&0];
159147 | ^^^^
@@ -163,7 +151,7 @@ LL | let [&(mut x)] = &mut [&0];
163151 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
164152
165153error[E0308]: mismatched types
166- --> $DIR/pattern-errors.rs:86 :11
154+ --> $DIR/pattern-errors.rs:83 :11
167155 |
168156LL | let [&&mut x] = &[&mut 0];
169157 | ^^^^^
@@ -175,7 +163,7 @@ LL | let [&&x] = &[&mut 0];
175163 | ~
176164
177165error[E0308]: mismatched types
178- --> $DIR/pattern-errors.rs:91 :11
166+ --> $DIR/pattern-errors.rs:88 :11
179167 |
180168LL | let [&&mut x] = &mut [&mut 0];
181169 | ^^^^^
@@ -187,7 +175,7 @@ LL | let [&&x] = &mut [&mut 0];
187175 | ~
188176
189177error[E0308]: mismatched types
190- --> $DIR/pattern-errors.rs:96 :11
178+ --> $DIR/pattern-errors.rs:93 :11
191179 |
192180LL | let [&&mut ref x] = &[&mut 0];
193181 | ^^^^^
@@ -199,7 +187,7 @@ LL | let [&&ref x] = &[&mut 0];
199187 | ~
200188
201189error[E0308]: mismatched types
202- --> $DIR/pattern-errors.rs:101 :11
190+ --> $DIR/pattern-errors.rs:98 :11
203191 |
204192LL | let [&&mut ref x] = &mut [&mut 0];
205193 | ^^^^^
@@ -211,7 +199,7 @@ LL | let [&&ref x] = &mut [&mut 0];
211199 | ~
212200
213201error[E0308]: mismatched types
214- --> $DIR/pattern-errors.rs:106 :11
202+ --> $DIR/pattern-errors.rs:103 :11
215203 |
216204LL | let [&&mut mut x] = &[&mut 0];
217205 | ^^^^^
@@ -223,7 +211,7 @@ LL | let [&&mut x] = &[&mut 0];
223211 | ~
224212
225213error[E0308]: mismatched types
226- --> $DIR/pattern-errors.rs:111 :11
214+ --> $DIR/pattern-errors.rs:108 :11
227215 |
228216LL | let [&&mut mut x] = &mut [&mut 0];
229217 | ^^^^^
@@ -234,7 +222,7 @@ help: replace this `&mut` pattern with `&`
234222LL | let [&&mut x] = &mut [&mut 0];
235223 | ~
236224
237- error: aborting due to 20 previous errors
225+ error: aborting due to 19 previous errors
238226
239227Some errors have detailed explanations: E0308, E0658.
240228For more information about an error, try `rustc --explain E0308`.
0 commit comments