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)]
14 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
15 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
17 error[E0080]: evaluation of constant value failed
18 --> $DIR/conditional_array_execution.rs:12:20
20 LL | println!("{}", FOO);
21 | ^^^ referenced constant has errors
23 warning: erroneous constant used
24 --> $DIR/conditional_array_execution.rs:12:20
26 LL | println!("{}", FOO);
27 | ^^^ referenced constant has errors
29 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
30 = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
32 error: aborting due to previous error; 2 warnings emitted
34 For more information about this error, try `rustc --explain E0080`.