1 error[E0308]: mismatched types
2 --> $DIR/const-eval-overflow-4b.rs:9:30
4 LL | : [u32; (i8::MAX as i8 + 1u8) as usize]
5 | ^^^ expected `i8`, found `u8`
7 error[E0277]: cannot add `u8` to `i8` in const contexts
8 --> $DIR/const-eval-overflow-4b.rs:9:28
10 LL | : [u32; (i8::MAX as i8 + 1u8) as usize]
11 | ^ no implementation for `i8 + u8`
13 = help: the trait `~const Add<u8>` is not implemented for `i8`
14 = help: the following other types implement trait `Add<Rhs>`:
17 <&'a i128 as Add<i128>>
22 <&'a isize as Add<isize>>
25 error[E0604]: only `u8` can be cast as `char`, not `i8`
26 --> $DIR/const-eval-overflow-4b.rs:22:13
28 LL | : [u32; 5i8 as char as usize]
29 | ^^^^^^^^^^^ invalid cast
31 help: try casting from `u8` instead
32 --> $DIR/const-eval-overflow-4b.rs:22:13
34 LL | : [u32; 5i8 as char as usize]
37 error: aborting due to 3 previous errors
39 Some errors have detailed explanations: E0277, E0308, E0604.
40 For more information about an error, try `rustc --explain E0277`.