]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/issue-68542-closure-in-array-len.rs
Rollup merge of #72279 - RalfJung:raw-ref-macros, r=nikomatsakis
[rust.git] / src / test / 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 calls in constants are limited to
7     //~^ ERROR evaluation of constant value failed
8 }
9
10 fn main() {}