aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/match-slicepattern-array.rs
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/rust/compile/match-slicepattern-array.rs')
-rw-r--r--gcc/testsuite/rust/compile/match-slicepattern-array.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/match-slicepattern-array.rs b/gcc/testsuite/rust/compile/match-slicepattern-array.rs
new file mode 100644
index 0000000..e48ca75
--- /dev/null
+++ b/gcc/testsuite/rust/compile/match-slicepattern-array.rs
@@ -0,0 +1,8 @@
+fn main() {
+ let a = [0, 1];
+
+ match a {
+ [0, 1] => {},
+ _ => {}
+ }
+}