mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-01 21:45:15 +00:00
14 lines
303 B
Rust
14 lines
303 B
Rust
const LENGTH: f64 = 2;
|
|
//~^ ERROR mismatched types
|
|
//~| NOTE expected `f64`, found integer
|
|
|
|
struct Thing {
|
|
f: [[f64; 2]; LENGTH],
|
|
//~^ ERROR mismatched types
|
|
//~| NOTE 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]] };
|
|
}
|