Add a test for slice patterns
This commit is contained in:
parent
66d3924aa8
commit
996dbbf960
@ -63,3 +63,11 @@ fn combine_patterns() {
|
||||
_ => return,
|
||||
};
|
||||
}
|
||||
|
||||
fn slice_patterns() {
|
||||
match b"123" {
|
||||
[0, ..] => {}
|
||||
[0, foo..] => {}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
@ -75,3 +75,11 @@ fn combine_patterns() {
|
||||
_ => return,
|
||||
};
|
||||
}
|
||||
|
||||
fn slice_patterns() {
|
||||
match b"123" {
|
||||
[0, ..] => {}
|
||||
[0, foo..] => {}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user