rust/src/test/ui/consts/const-eval/shift_overflow.rs

10 lines
166 B
Rust
Raw Normal View History

2018-06-27 06:47:19 -05:00
enum Foo {
// test that we detect overflows for non-u32 discriminants
X = 1 << ((u32::max_value() as u64) + 1), //~ ERROR E0080
Y = 42,
}
fn main() {
}