2020-03-26 16:10:58 +00:00
|
|
|
fn a() {
|
|
|
|
[0; [|_: _ &_| ()].len()]
|
2024-06-05 17:02:18 -04:00
|
|
|
//~^ ERROR expected one of `,` or `|`, found `&`
|
2020-03-26 16:10:58 +00:00
|
|
|
//~| ERROR type annotations needed
|
|
|
|
}
|
|
|
|
|
|
|
|
fn b() {
|
|
|
|
[0; [|f @ &ref _| {} ; 0 ].len() ];
|
|
|
|
//~^ ERROR expected identifier, found reserved identifier `_`
|
|
|
|
}
|
|
|
|
|
2020-03-27 10:56:02 +02:00
|
|
|
fn c() {
|
|
|
|
[0; [|&_: _ &_| {}; 0 ].len()]
|
2024-06-05 17:02:18 -04:00
|
|
|
//~^ ERROR expected one of `,` or `|`, found `&`
|
2024-04-05 22:52:22 -04:00
|
|
|
//~| ERROR type annotations needed
|
2020-03-27 10:56:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
fn d() {
|
|
|
|
[0; match [|f @ &ref _| () ] {} ]
|
|
|
|
//~^ ERROR expected identifier, found reserved identifier `_`
|
|
|
|
}
|
|
|
|
|
2020-03-26 16:10:58 +00:00
|
|
|
fn main() {}
|