1 // Evaluation of constants in array-elem count goes through different
2 // compiler control-flow paths.
4 // This test is checking the count in an array type.
6 #![allow(unused_imports)]
9 : [u32; (i8::MAX as i8 + 1u8) as usize]
10 //~^ ERROR mismatched types
11 //~| expected `i8`, found `u8`
12 //~| ERROR cannot add `u8` to `i8`
13 = [0; (i8::MAX as usize) + 1];
17 : [u32; 5u8 as char as usize]
21 const A_BAD_CHAR_USIZE
22 : [u32; 5i8 as char as usize]
23 //~^ ERROR only `u8` can be cast as `char`, not `i8`