Files
rust/tests/ui/consts/const-err-multi.rs

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

14 lines
313 B
Rust
Raw Normal View History

pub const A: i8 = -i8::MIN;
//~^ NOTE failed here
//~| ERROR attempt to negate `i8::MIN`, which would overflow
pub const B: i8 = A;
//~^ NOTE erroneous constant
pub const C: u8 = A as u8;
//~^ NOTE erroneous constant
pub const D: i8 = 50 - A;
//~^ NOTE erroneous constant
fn main() {
2018-01-29 20:47:09 +01:00
let _ = (A, B, C, D);
}