]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-12567.rs
Auto merge of #104013 - notriddle:notriddle/rustdoc-sizeof, r=GuillaumeGomez
[rust.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() {}