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