summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-12567.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-12567.rs')
-rw-r--r--tests/ui/issues/issue-12567.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-12567.rs b/tests/ui/issues/issue-12567.rs
new file mode 100644
index 000000000..1b2a37de4
--- /dev/null
+++ b/tests/ui/issues/issue-12567.rs
@@ -0,0 +1,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() {}