rust/tests/ui/consts/const-eval/shift_overflow.rs
2023-01-11 09:32:08 +00:00

10 lines
158 B
Rust

enum Foo {
// test that we detect overflows for non-u32 discriminants
X = 1 << ((u32::MAX as u64) + 1), //~ ERROR E0080
Y = 42,
}
fn main() {
}