]> git.lizzy.rs Git - rust.git/blob - src/test/ui/moves/move-out-of-slice-1.rs
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / moves / move-out-of-slice-1.rs
1 #![feature(box_patterns)]
2
3 struct A;
4
5 fn main() {
6     let a: Box<[A]> = Box::new([A]);
7     match a {
8         box [a] => {}, //~ ERROR cannot move out of type `[A]`, a non-copy slice
9         _ => {}
10     }
11 }