rust/tests/ui/unsized/issue-115809.rs
2023-09-13 23:07:39 +08:00

14 lines
309 B
Rust

// compile-flags: --emit=link -Zmir-opt-level=2 -Zpolymorphize=on
fn foo<T>() {
let a: [i32; 0] = [];
match [a[..]] {
//~^ ERROR cannot move a value of type `[i32]
//~| ERROR cannot move out of type `[i32]`, a non-copy slice
[[x]] => {}
_ => (),
}
}
fn main() {}