rust/tests/ui/consts/const-err-early.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
368 B
Rust
Raw Normal View History

2022-09-21 06:05:20 -05:00
pub const A: i8 = -i8::MIN; //~ ERROR constant
pub const B: u8 = 200u8 + 200u8; //~ ERROR constant
pub const C: u8 = 200u8 * 4; //~ ERROR constant
pub const D: u8 = 42u8 - (42u8 + 1); //~ ERROR constant
pub const E: u8 = [5u8][1]; //~ ERROR constant
fn main() {
2018-01-29 13:47:09 -06:00
let _a = A;
let _b = B;
let _c = C;
let _d = D;
let _e = E;
let _e = [6u8][1];
}