]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-eval/shift_overflow.rs
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / consts / const-eval / shift_overflow.rs
CommitLineData
8faf50e0
XL
1enum Foo {
2 // test that we detect overflows for non-u32 discriminants
72b1a166 3 X = 1 << ((u32::MAX as u64) + 1), //~ ERROR E0080
8faf50e0
XL
4 Y = 42,
5}
0531ce1d 6
0531ce1d 7
8faf50e0 8fn main() {
54a0048b 9}