mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
12 lines
206 B
Rust
12 lines
206 B
Rust
#![feature(box_patterns)]
|
|
|
|
struct A;
|
|
|
|
fn main() {
|
|
let a: Box<[A]> = Box::new([A]);
|
|
match a { //~ ERROR cannot move out of type `[A]`, a non-copy slice
|
|
box [a] => {},
|
|
_ => {}
|
|
}
|
|
}
|