rust/tests/ui/issues/issue-66706.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
453 B
Rust
Raw Normal View History

2020-03-26 16:10:58 +00:00
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 `_`
}
2020-03-26 16:10:58 +00:00
fn main() {}