mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 18:23:49 +00:00
13 lines
258 B
Rust
13 lines
258 B
Rust
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]] };
|
|
}
|