]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/issue-68542-closure-in-array-len.rs
Rollup merge of #106717 - klensy:typo, r=lcnr
[rust.git] / tests / ui / consts / issue-68542-closure-in-array-len.rs
1 // Regression test for issue #68542
2 // Tests that we don't ICE when a closure appears
3 // in the length part of an array.
4
5 struct Bug {
6     a: [(); (|| { 0 })()] //~ ERROR cannot call non-const closure
7 }
8
9 fn main() {}