]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-12567.rs
1 #![feature(slice_patterns)]
3 fn match_vecs
<'a
, T
>(l1
: &'a
[T
], l2
: &'a
[T
]) {
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