rust/tests/ui/issues/issue-66706.rs
2023-01-11 09:32:08 +00:00

23 lines
453 B
Rust

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() {}