]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-12567.rs
New upstream version 1.60.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-12567.rs
1 fn match_vecs<'a, T>(l1: &'a [T], l2: &'a [T]) {
2 match (l1, l2) {
3 //~^ ERROR: cannot move out of type `[T]`, a non-copy slice
4 //~| ERROR: cannot move out of type `[T]`, a non-copy slice
5 (&[], &[]) => println!("both empty"),
6 (&[], &[hd, ..]) | (&[hd, ..], &[])
7 => println!("one empty"),
8 (&[hd1, ..], &[hd2, ..])
9 => println!("both nonempty"),
10 }
11 }
12
13 fn main() {}