about summary refs log tree commit diff
path: root/tests/ui/issues/issue-66706.rs
blob: 87dc3437a57bda718f4fee5d6ba3969be10c0e63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
fn a() {
    [0; [|_: _ &_| ()].len()]
    //~^ ERROR expected one of `,` or `|`, 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 one of `,` or `|`, found `&`
    //~| ERROR type annotations needed
}

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

fn main() {}