2020-01-26 23:49:56 -06: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 03:05:54 -06:00
|
|
|
a: [(); (|| { 0 })()] //~ ERROR cannot call non-const closure
|
2023-03-24 04:17:51 -05:00
|
|
|
//~^ ERROR the trait bound
|
2020-01-26 23:49:56 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|