rust/tests/ui/consts/issue-39974.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
258 B
Rust
Raw Normal View History

const LENGTH: f64 = 2;
//~^ ERROR mismatched types
struct Thing {
f: [[f64; 2]; LENGTH],
//~^ ERROR mismatched types
//~| expected `usize`, found `f64`
}
fn main() {
let _t = Thing { f: [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]] };
}