2020-01-27 00:49:56 -05:00
|
|
|
// Regression test for issue #68542
|
|
|
|
// Tests that we don't ICE when a closure appears
|
|
|
|
// in the length part of an array.
|
|
|
|
|
|
|
|
struct Bug {
|
2021-12-29 17:05:54 +08:00
|
|
|
a: [(); (|| { 0 })()] //~ ERROR cannot call non-const closure
|
2023-03-24 09:17:51 +00:00
|
|
|
//~^ ERROR the trait bound
|
2020-01-27 00:49:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|