Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 996dbbf

Browse files
committed
Add a test for slice patterns
1 parent 66d3924 commit 996dbbf

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

tests/source/pattern.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,11 @@ fn combine_patterns() {
6363
_ => return,
6464
};
6565
}
66+
67+
fn slice_patterns() {
68+
match b"123" {
69+
[0, ..] => {}
70+
[0, foo..] => {}
71+
_ => {}
72+
}
73+
}

tests/target/pattern.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,11 @@ fn combine_patterns() {
7575
_ => return,
7676
};
7777
}
78+
79+
fn slice_patterns() {
80+
match b"123" {
81+
[0, ..] => {}
82+
[0, foo..] => {}
83+
_ => {}
84+
}
85+
}

0 commit comments

Comments
 (0)