about summary refs log tree commit diff
path: root/tests/ui/parser/issues/issue-72373.rs
blob: ed88d53539bd40239dc773742e4fd57abac0f8a2 (plain)
1
2
3
4
5
6
7
8
9
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 `,`, `@`, `]`, `if`, or `|`, found `..`
        [] => 0,
    }
}