rust/tests/ui/consts/const-eval/shift_overflow.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
158 B
Rust
Raw Normal View History

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