]> git.lizzy.rs Git - rust.git/blob - tests/ui/issues/issue-66706.rs
Rollup merge of #106865 - GuillaumeGomez:add-gui-test-explanation, r=notriddle
[rust.git] / tests / ui / issues / issue-66706.rs
1 fn a() {
2     [0; [|_: _ &_| ()].len()]
3     //~^ ERROR expected `,`, found `&`
4     //~| ERROR type annotations needed
5 }
6
7 fn b() {
8     [0; [|f @ &ref _| {} ; 0 ].len() ];
9     //~^ ERROR expected identifier, found reserved identifier `_`
10 }
11
12 fn c() {
13     [0; [|&_: _ &_| {}; 0 ].len()]
14     //~^ ERROR expected `,`, found `&`
15 }
16
17 fn d() {
18     [0; match [|f @ &ref _| () ] {} ]
19     //~^ ERROR expected identifier, found reserved identifier `_`
20 }
21
22 fn main() {}