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