about summary refs log tree commit diff
path: root/tests/ui/consts/issue-39974.rs
blob: adc65d9be0d044c69a9f8c300d32e063727f7eac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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]] };
}