rust/src/test/ui/issues/issue-66706.rs
Dylan MacKenzie d6139f76c0 Update tests
2020-06-28 10:08:10 -07:00

25 lines
549 B
Rust

fn a() {
[0; [|_: _ &_| ()].len()]
//~^ ERROR expected `,`, found `&`
//~| ERROR type annotations needed
//~| ERROR mismatched types
}
fn b() {
[0; [|f @ &ref _| {} ; 0 ].len() ];
//~^ ERROR expected identifier, found reserved identifier `_`
}
fn c() {
[0; [|&_: _ &_| {}; 0 ].len()]
//~^ ERROR expected `,`, found `&`
//~| ERROR mismatched types
}
fn d() {
[0; match [|f @ &ref _| () ] {} ]
//~^ ERROR expected identifier, found reserved identifier `_`
//~| ERROR mismatched types
}
fn main() {}