]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-66706.rs
New upstream version 1.46.0~beta.2+dfsg1
[rustc.git] / src / test / ui / issues / issue-66706.rs
1 fn a() {
2 [0; [|_: _ &_| ()].len()]
3 //~^ ERROR expected `,`, found `&`
4 //~| ERROR type annotations needed
5 //~| ERROR mismatched types
6 }
7
8 fn b() {
9 [0; [|f @ &ref _| {} ; 0 ].len() ];
10 //~^ ERROR expected identifier, found reserved identifier `_`
11 }
12
13 fn c() {
14 [0; [|&_: _ &_| {}; 0 ].len()]
15 //~^ ERROR expected `,`, found `&`
16 //~| ERROR mismatched types
17 }
18
19 fn d() {
20 [0; match [|f @ &ref _| () ] {} ]
21 //~^ ERROR expected identifier, found reserved identifier `_`
22 //~| ERROR mismatched types
23 }
24
25 fn main() {}