rust/src/test/run-fail/mod-zero.rs

7 lines
125 B
Rust
Raw Normal View History

// error-pattern:attempt to calculate the remainder with a divisor of zero
fn main() {
2015-01-25 21:05:03 +00:00
let y = 0;
let _z = 1 % y;
}