2 // compile-flags: -Zforce-overflow-checks=on
4 #![allow(arithmetic_overflow)]
7 fn black_box<T>(_: T) {
11 const FOO: u8 = [5u8][1];
12 //~^ WARN any use of this value will cause an error
13 //~| WARN this was previously accepted by the compiler but is being phased out
16 black_box((FOO, FOO));
17 //~^ ERROR erroneous constant used
18 //~| ERROR erroneous constant