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 expression.
6 // This is a variation of another such test, but in this case the
7 // types for the left- and right-hand sides of the addition do not
8 // match (as well as overflow).
10 #![allow(unused_imports)]
15 : [u32; (i8::MAX as usize) + 1]
16 = [0; (i8::MAX + 1u8) as usize];
17 //~^ ERROR mismatched types
18 //~| ERROR cannot add `u8` to `i8`
24 fn foo<T:fmt::Debug>(x: T) {