1 error: expected `,`, found `&`
2 --> $DIR/issue-66706.rs:2:16
4 LL | [0; [|_: _ &_| ()].len()]
9 error: expected identifier, found reserved identifier `_`
10 --> $DIR/issue-66706.rs:9:20
12 LL | [0; [|f @ &ref _| {} ; 0 ].len() ];
13 | ^ expected identifier, found reserved identifier
15 error: expected `,`, found `&`
16 --> $DIR/issue-66706.rs:14:17
18 LL | [0; [|&_: _ &_| {}; 0 ].len()]
23 error: expected identifier, found reserved identifier `_`
24 --> $DIR/issue-66706.rs:20:26
26 LL | [0; match [|f @ &ref _| () ] {} ]
27 | ^ expected identifier, found reserved identifier
29 error[E0282]: type annotations needed
30 --> $DIR/issue-66706.rs:2:11
32 LL | [0; [|_: _ &_| ()].len()]
33 | ^ consider giving this closure parameter a type
35 error[E0308]: mismatched types
36 --> $DIR/issue-66706.rs:2:5
39 | - help: try adding a return type: `-> [i32; _]`
40 LL | [0; [|_: _ &_| ()].len()]
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found array `[{integer}; _]`
43 error[E0308]: mismatched types
44 --> $DIR/issue-66706.rs:14:5
47 | - help: try adding a return type: `-> [i32; _]`
48 LL | [0; [|&_: _ &_| {}; 0 ].len()]
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found array `[{integer}; _]`
51 error[E0308]: mismatched types
52 --> $DIR/issue-66706.rs:20:5
55 | - help: try adding a return type: `-> [i32; _]`
56 LL | [0; match [|f @ &ref _| () ] {} ]
57 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found array `[{integer}; _]`
59 error: aborting due to 8 previous errors
61 Some errors have detailed explanations: E0282, E0308.
62 For more information about an error, try `rustc --explain E0282`.