]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/issue-39974.rs
Rollup merge of #106949 - compiler-errors:is-poly, r=BoxyUwU
[rust.git] / tests / ui / consts / issue-39974.rs
1 const LENGTH: f64 = 2;
2
3 struct Thing {
4     f: [[f64; 2]; LENGTH],
5     //~^ ERROR mismatched types
6     //~| expected `usize`, found `f64`
7 }
8
9 fn main() {
10     let _t = Thing { f: [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]] };
11 }