error[E0308]: mismatched types --> $DIR/const-array-oob-arith.rs:7:45 | LL | const BLUB: [i32; (ARR[0] - 40) as usize] = [5]; | ^^^ expected `Const { ty: usize, val: Scalar(0x0000000000000002) }`, found `Const { ty: usize, val: Scalar(0x0000000000000001) }` | = note: expected type `[i32; 2]` found type `[i32; 1]` error[E0308]: mismatched types --> $DIR/const-array-oob-arith.rs:8:44 | LL | const BOO: [i32; (ARR[0] - 41) as usize] = [5, 99]; | ^^^^^^^ expected `Const { ty: usize, val: Scalar(0x0000000000000001) }`, found `Const { ty: usize, val: Scalar(0x0000000000000002) }` | = note: expected type `[i32; 1]` found type `[i32; 2]` error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0308`.