summaryrefslogtreecommitdiffstats
path: root/tests/ui/unsized/issue-115203.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/unsized/issue-115203.rs')
-rw-r--r--tests/ui/unsized/issue-115203.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/unsized/issue-115203.rs b/tests/ui/unsized/issue-115203.rs
new file mode 100644
index 000000000..5fe7bd642
--- /dev/null
+++ b/tests/ui/unsized/issue-115203.rs
@@ -0,0 +1,11 @@
+// compile-flags: --emit link
+
+fn main() {
+ let a: [i32; 0] = [];
+ match [a[..]] {
+ //~^ ERROR cannot move a value of type `[i32]
+ //~| ERROR cannot move out of type `[i32]`, a non-copy slice
+ [[]] => (),
+ _ => (),
+ }
+}