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