summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-66706.rs
blob: 835fdfae86c033790b72681ddb11d7454b35d3de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
fn a() {
    [0; [|_: _ &_| ()].len()]
    //~^ ERROR expected `,`, found `&`
    //~| ERROR type annotations needed
}

fn b() {
    [0; [|f @ &ref _| {} ; 0 ].len() ];
    //~^ ERROR expected identifier, found reserved identifier `_`
}

fn c() {
    [0; [|&_: _ &_| {}; 0 ].len()]
    //~^ ERROR expected `,`, found `&`
}

fn d() {
    [0; match [|f @ &ref _| () ] {} ]
    //~^ ERROR expected identifier, found reserved identifier `_`
}

fn main() {}