]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/const-err-early.rs
Merge branch 'debian/sid' into debian/experimental
[rustc.git] / src / test / ui / consts / const-err-early.rs
1 #![deny(const_err)]
2
3 pub const A: i8 = -i8::MIN; //~ ERROR const_err
4 //~| WARN this was previously accepted by the compiler but is being phased out
5 pub const B: u8 = 200u8 + 200u8; //~ ERROR const_err
6 //~| WARN this was previously accepted by the compiler but is being phased out
7 pub const C: u8 = 200u8 * 4; //~ ERROR const_err
8 //~| WARN this was previously accepted by the compiler but is being phased out
9 pub const D: u8 = 42u8 - (42u8 + 1); //~ ERROR const_err
10 //~| WARN this was previously accepted by the compiler but is being phased out
11 pub const E: u8 = [5u8][1]; //~ ERROR const_err
12 //~| WARN this was previously accepted by the compiler but is being phased out
13
14 fn main() {
15 let _a = A;
16 let _b = B;
17 let _c = C;
18 let _d = D;
19 let _e = E;
20 let _e = [6u8][1];
21 }