1 warning: any use of this value will cause an error
2 --> $DIR/conditional_array_execution.rs:7:19
4 LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
5 | ------------------^^^^^---------------------------
7 | attempt to compute `5_u32 - 6_u32` which would overflow
9 note: the lint level is defined here
10 --> $DIR/conditional_array_execution.rs:3:9
12 LL | #![warn(const_err)]
15 error[E0080]: evaluation of constant expression failed
16 --> $DIR/conditional_array_execution.rs:11:20
18 LL | println!("{}", FOO);
19 | ^^^ referenced constant has errors
21 warning: erroneous constant used
22 --> $DIR/conditional_array_execution.rs:11:20
24 LL | println!("{}", FOO);
25 | ^^^ referenced constant has errors
27 error: aborting due to previous error; 2 warnings emitted
29 For more information about this error, try `rustc --explain E0080`.