fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
816 B23 linesraw
1error[E0382]: use of moved value: `a[..]`
2  --> $DIR/borrowck-move-out-from-array.rs:7:14
3   |
4LL |     let [_, _x] = a;
5   |             -- value moved here
6LL |     let [.., _y] = a;
7   |              ^^ value used here after move
8   |
9   = note: move occurs because `a[..]` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
10
11error[E0382]: use of moved value: `a[..]`
12  --> $DIR/borrowck-move-out-from-array.rs:13:10
13   |
14LL |     let [_x, _] = a;
15   |          -- value moved here
16LL |     let [_y @ ..] = a;
17   |          ^^^^^^^ value used here after move
18   |
19   = note: move occurs because `a[..]` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
20
21error: aborting due to 2 previous errors
22
23For more information about this error, try `rustc --explain E0382`.