summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-err-multi.rs
blob: 62552e1476ce2de2da0d5bff3879a24803a15478 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![deny(const_err)]

pub const A: i8 = -i8::MIN;
//~^ ERROR const_err
//~| WARN this was previously accepted by the compiler but is being phased out
pub const B: i8 = A;
//~^ ERROR const_err
//~| WARN this was previously accepted by the compiler but is being phased out
pub const C: u8 = A as u8;
//~^ ERROR const_err
//~| WARN this was previously accepted by the compiler but is being phased out
pub const D: i8 = 50 - A;
//~^ ERROR const_err
//~| WARN this was previously accepted by the compiler but is being phased out

fn main() {
    let _ = (A, B, C, D);
}