rust/tests/ui/parser/issues/issue-72373.rs
2023-01-11 09:32:08 +00:00

10 lines
260 B
Rust

fn foo(c: &[u32], n: u32) -> u32 {
match *c {
[h, ..] if h > n => 0,
[h, ..] if h == n => 1,
[h, ref ts..] => foo(c, n - h) + foo(ts, n),
//~^ ERROR expected one of `,`, `@`, `]`, or `|`, found `..`
[] => 0,
}
}