]> git.lizzy.rs Git - rust.git/blob - src/test/ui/moves/move-out-of-slice-1.rs
Rollup merge of #105843 - compiler-errors:sugg-const, r=lcnr
[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 { //~ ERROR cannot move out of type `[A]`, a non-copy slice
8         box [a] => {},
9         _ => {}
10     }
11 }