mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
12 lines
230 B
Rust
12 lines
230 B
Rust
const LENGTH: f64 = 2;
|
|
|
|
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]] };
|
|
}
|