1 // Regression test for issue #3645
6 //~^ ERROR attempt to use a non-constant value in a constant [E0435]
8 //~^ ERROR mismatched types
9 //~| expected `usize`, found `()`
11 //~^ ERROR mismatched types
12 //~| expected `usize`, found `bool`
14 //~^ ERROR mismatched types
15 //~| expected `usize`, found floating-point number
17 //~^ ERROR mismatched types
18 //~| expected `usize`, found `&str`
19 let f = [0; -4_isize];
20 //~^ ERROR mismatched types
21 //~| expected `usize`, found `isize`
22 let f = [0_usize; -1_isize];
23 //~^ ERROR mismatched types
24 //~| expected `usize`, found `isize`
28 let g = [0; G { g: () }];
29 //~^ ERROR mismatched types
30 //~| expected `usize`, found struct `main::G`