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