summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/issues/issue-72373.rs
blob: 4da6061c27fe840a82da12e0cb340dece6a4745e (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 `,`, `@`, `]`, or `|`, found `..`
        [] => 0,
    }
}