1 const X: usize = 42 && 39;
2 //~^ ERROR mismatched types
3 //~| expected `bool`, found integer
4 //~| ERROR mismatched types
5 //~| expected `bool`, found integer
6 //~| ERROR mismatched types
7 //~| expected `usize`, found `bool`
8 const ARR: [i32; X] = [99; 34];
11 const X1: usize = 42 || 39;
12 //~^ ERROR mismatched types
13 //~| expected `bool`, found integer
14 //~| ERROR mismatched types
15 //~| expected `bool`, found integer
16 //~| ERROR mismatched types
17 //~| expected `usize`, found `bool`
18 const ARR1: [i32; X1] = [99; 47];
21 const X2: usize = -42 || -39;
22 //~^ ERROR mismatched types
23 //~| expected `bool`, found integer
24 //~| ERROR mismatched types
25 //~| expected `bool`, found integer
26 //~| ERROR mismatched types
27 //~| expected `usize`, found `bool`
28 const ARR2: [i32; X2] = [99; 18446744073709551607];
31 const X3: usize = -42 && -39;
32 //~^ ERROR mismatched types
33 //~| expected `bool`, found integer
34 //~| ERROR mismatched types
35 //~| expected `bool`, found integer
36 //~| ERROR mismatched types
37 //~| expected `usize`, found `bool`
38 const ARR3: [i32; X3] = [99; 6];
41 const Y: usize = 42.0 == 42.0;
42 //~^ ERROR mismatched types
43 //~| expected `usize`, found `bool`
44 const ARRR: [i32; Y] = [99; 1];
47 const Y1: usize = 42.0 >= 42.0;
48 //~^ ERROR mismatched types
49 //~| expected `usize`, found `bool`
50 const ARRR1: [i32; Y1] = [99; 1];
53 const Y2: usize = 42.0 <= 42.0;
54 //~^ ERROR mismatched types
55 //~| expected `usize`, found `bool`
56 const ARRR2: [i32; Y2] = [99; 1];
59 const Y3: usize = 42.0 > 42.0;
60 //~^ ERROR mismatched types
61 //~| expected `usize`, found `bool`
62 const ARRR3: [i32; Y3] = [99; 0];
65 const Y4: usize = 42.0 < 42.0;
66 //~^ ERROR mismatched types
67 //~| expected `usize`, found `bool`
68 const ARRR4: [i32; Y4] = [99; 0];
71 const Y5: usize = 42.0 != 42.0;
72 //~^ ERROR mismatched types
73 //~| expected `usize`, found `bool`
74 const ARRR5: [i32; Y5] = [99; 0];