summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-12567.rs
blob: 1b2a37de475398dec728af32f67174998c0e9a4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
fn match_vecs<'a, T>(l1: &'a [T], l2: &'a [T]) {
    match (l1, l2) {
    //~^ ERROR: cannot move out of type `[T]`, a non-copy slice
    //~| ERROR: cannot move out of type `[T]`, a non-copy slice
        (&[], &[]) => println!("both empty"),
        (&[], &[hd, ..]) | (&[hd, ..], &[])
            => println!("one empty"),
        (&[hd1, ..], &[hd2, ..])
            => println!("both nonempty"),
    }
}

fn main() {}