]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/const-err-multi.rs
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / consts / const-err-multi.rs
1 #![deny(const_err)]
2
3 pub const A: i8 = -i8::MIN;
4 //~^ ERROR const_err
5 //~| WARN this was previously accepted by the compiler but is being phased out
6 pub const B: i8 = A;
7 //~^ ERROR const_err
8 //~| WARN this was previously accepted by the compiler but is being phased out
9 pub const C: u8 = A as u8;
10 //~^ ERROR const_err
11 //~| WARN this was previously accepted by the compiler but is being phased out
12 pub const D: i8 = 50 - A;
13 //~^ ERROR const_err
14 //~| WARN this was previously accepted by the compiler but is being phased out
15
16 fn main() {
17 let _ = (A, B, C, D);
18 }