@@ -35,16 +35,16 @@ LL | if let Some(&Some(&_)) = &mut Some(&Some(0)) {
35
35
| ~
36
36
37
37
error[E0308]: mismatched types
38
- --> $DIR/pattern-errors.rs:32:29
38
+ --> $DIR/pattern-errors.rs:32:28
39
39
|
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
+ | ^^^^^
42
42
|
43
43
= note: cannot match inherited `&` with `&mut` pattern
44
44
help: replace this `&mut` pattern with `&`
45
45
|
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
+ | ~
48
48
49
49
error[E0308]: mismatched types
50
50
--> $DIR/pattern-errors.rs:35:17
@@ -59,19 +59,7 @@ LL | if let Some(&Some(x)) = &Some(Some(0)) {
59
59
| ~
60
60
61
61
error[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
75
63
|
76
64
LL | let &[&mut x] = &&mut [0];
77
65
| ^^^^^
@@ -83,7 +71,7 @@ LL | let &[&x] = &&mut [0];
83
71
| ~
84
72
85
73
error[E0308]: mismatched types
86
- --> $DIR/pattern-errors.rs:49 :11
74
+ --> $DIR/pattern-errors.rs:46 :11
87
75
|
88
76
LL | let &[&mut x] = &mut &mut [0];
89
77
| ^^^^^
@@ -95,7 +83,7 @@ LL | let &[&x] = &mut &mut [0];
95
83
| ~
96
84
97
85
error[E0308]: mismatched types
98
- --> $DIR/pattern-errors.rs:54 :11
86
+ --> $DIR/pattern-errors.rs:51 :11
99
87
|
100
88
LL | let &[&mut ref x] = &&mut [0];
101
89
| ^^^^^
@@ -107,7 +95,7 @@ LL | let &[&ref x] = &&mut [0];
107
95
| ~
108
96
109
97
error[E0308]: mismatched types
110
- --> $DIR/pattern-errors.rs:59 :11
98
+ --> $DIR/pattern-errors.rs:56 :11
111
99
|
112
100
LL | let &[&mut ref x] = &mut &mut [0];
113
101
| ^^^^^
@@ -119,7 +107,7 @@ LL | let &[&ref x] = &mut &mut [0];
119
107
| ~
120
108
121
109
error[E0308]: mismatched types
122
- --> $DIR/pattern-errors.rs:64 :11
110
+ --> $DIR/pattern-errors.rs:61 :11
123
111
|
124
112
LL | let &[&mut mut x] = &&mut [0];
125
113
| ^^^^^
@@ -131,7 +119,7 @@ LL | let &[&mut x] = &&mut [0];
131
119
| ~
132
120
133
121
error[E0308]: mismatched types
134
- --> $DIR/pattern-errors.rs:69 :11
122
+ --> $DIR/pattern-errors.rs:66 :11
135
123
|
136
124
LL | let &[&mut mut x] = &mut &mut [0];
137
125
| ^^^^^
@@ -143,7 +131,7 @@ LL | let &[&mut x] = &mut &mut [0];
143
131
| ~
144
132
145
133
error[E0658]: binding cannot be both mutable and by-reference
146
- --> $DIR/pattern-errors.rs:76 :12
134
+ --> $DIR/pattern-errors.rs:73 :12
147
135
|
148
136
LL | let [&(mut x)] = &[&0];
149
137
| ^^^^
@@ -153,7 +141,7 @@ LL | let [&(mut x)] = &[&0];
153
141
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
154
142
155
143
error[E0658]: binding cannot be both mutable and by-reference
156
- --> $DIR/pattern-errors.rs:80 :12
144
+ --> $DIR/pattern-errors.rs:77 :12
157
145
|
158
146
LL | let [&(mut x)] = &mut [&0];
159
147
| ^^^^
@@ -163,7 +151,7 @@ LL | let [&(mut x)] = &mut [&0];
163
151
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
164
152
165
153
error[E0308]: mismatched types
166
- --> $DIR/pattern-errors.rs:86 :11
154
+ --> $DIR/pattern-errors.rs:83 :11
167
155
|
168
156
LL | let [&&mut x] = &[&mut 0];
169
157
| ^^^^^
@@ -175,7 +163,7 @@ LL | let [&&x] = &[&mut 0];
175
163
| ~
176
164
177
165
error[E0308]: mismatched types
178
- --> $DIR/pattern-errors.rs:91 :11
166
+ --> $DIR/pattern-errors.rs:88 :11
179
167
|
180
168
LL | let [&&mut x] = &mut [&mut 0];
181
169
| ^^^^^
@@ -187,7 +175,7 @@ LL | let [&&x] = &mut [&mut 0];
187
175
| ~
188
176
189
177
error[E0308]: mismatched types
190
- --> $DIR/pattern-errors.rs:96 :11
178
+ --> $DIR/pattern-errors.rs:93 :11
191
179
|
192
180
LL | let [&&mut ref x] = &[&mut 0];
193
181
| ^^^^^
@@ -199,7 +187,7 @@ LL | let [&&ref x] = &[&mut 0];
199
187
| ~
200
188
201
189
error[E0308]: mismatched types
202
- --> $DIR/pattern-errors.rs:101 :11
190
+ --> $DIR/pattern-errors.rs:98 :11
203
191
|
204
192
LL | let [&&mut ref x] = &mut [&mut 0];
205
193
| ^^^^^
@@ -211,7 +199,7 @@ LL | let [&&ref x] = &mut [&mut 0];
211
199
| ~
212
200
213
201
error[E0308]: mismatched types
214
- --> $DIR/pattern-errors.rs:106 :11
202
+ --> $DIR/pattern-errors.rs:103 :11
215
203
|
216
204
LL | let [&&mut mut x] = &[&mut 0];
217
205
| ^^^^^
@@ -223,7 +211,7 @@ LL | let [&&mut x] = &[&mut 0];
223
211
| ~
224
212
225
213
error[E0308]: mismatched types
226
- --> $DIR/pattern-errors.rs:111 :11
214
+ --> $DIR/pattern-errors.rs:108 :11
227
215
|
228
216
LL | let [&&mut mut x] = &mut [&mut 0];
229
217
| ^^^^^
@@ -234,7 +222,7 @@ help: replace this `&mut` pattern with `&`
234
222
LL | let [&&mut x] = &mut [&mut 0];
235
223
| ~
236
224
237
- error: aborting due to 20 previous errors
225
+ error: aborting due to 19 previous errors
238
226
239
227
Some errors have detailed explanations: E0308, E0658.
240
228
For more information about an error, try `rustc --explain E0308`.
0 commit comments