rust/tests/ui/consts/eval-enum.rs

11 lines
293 B
Rust
Raw Normal View History

2018-01-16 02:31:48 -06:00
enum Test {
DivZero = 1/0,
//~^ attempt to divide `1_isize` by zero
//~| ERROR evaluation of constant value failed
2018-01-16 02:31:48 -06:00
RemZero = 1%0,
//~^ attempt to calculate the remainder of `1_isize` with a divisor of zero
//~| ERROR evaluation of constant value failed
}
fn main() {}