@@ -192,8 +192,8 @@ error[E0503]: cannot use `v[..]` because it was mutably borrowed
192
192
LL | let x = &mut v;
193
193
| ------ borrow of `v` occurs here
194
194
LL | match v {
195
- LL | &[x..] => println!("{:?}", x),
196
- | ^ use of borrowed `v`
195
+ LL | &[x @ ..] => println!("{:?}", x),
196
+ | ^^^^^^ use of borrowed `v`
197
197
...
198
198
LL | drop(x);
199
199
| - borrow later used here
@@ -204,8 +204,8 @@ error[E0503]: cannot use `v[..]` because it was mutably borrowed
204
204
LL | let x = &mut v;
205
205
| ------ borrow of `v` occurs here
206
206
...
207
- LL | &[_, x..] => println!("{:?}", x),
208
- | ^ use of borrowed `v`
207
+ LL | &[_, x @ ..] => println!("{:?}", x),
208
+ | ^^^^^^ use of borrowed `v`
209
209
...
210
210
LL | drop(x);
211
211
| - borrow later used here
@@ -216,8 +216,8 @@ error[E0503]: cannot use `v[..]` because it was mutably borrowed
216
216
LL | let x = &mut v;
217
217
| ------ borrow of `v` occurs here
218
218
...
219
- LL | &[x.., _] => println!("{:?}", x),
220
- | ^ use of borrowed `v`
219
+ LL | &[x @ .., _] => println!("{:?}", x),
220
+ | ^^^^^^ use of borrowed `v`
221
221
...
222
222
LL | drop(x);
223
223
| - borrow later used here
@@ -228,8 +228,8 @@ error[E0503]: cannot use `v[..]` because it was mutably borrowed
228
228
LL | let x = &mut v;
229
229
| ------ borrow of `v` occurs here
230
230
...
231
- LL | &[_, x.., _] => println!("{:?}", x),
232
- | ^ use of borrowed `v`
231
+ LL | &[_, x @ .., _] => println!("{:?}", x),
232
+ | ^^^^^^ use of borrowed `v`
233
233
...
234
234
LL | drop(x);
235
235
| - borrow later used here
0 commit comments