blob: 9a1a970778fb4555442a2a3966ddc5d7ac0b6a6a [file] [log] [blame]
const X: u32 = 5;
const Y: u32 = 6;
const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
//~^ERROR: evaluation of constant value failed
#[rustfmt::skip] // rustfmt bug: https://github.com/rust-lang/rustfmt/issues/5391
fn main() {
println!("{}", FOO);
}