about summary refs log tree commit diff
path: root/tests/ui/numbers-arithmetic/mod-zero.rs
blob: f3cc7c9fc88f0db2eb71789ef7bb13e8f982a89f (plain)
1
2
3
4
5
6
7
8
9
//@ run-fail
//@ error-pattern:attempt to calculate the remainder with a divisor of zero
//@ ignore-emscripten no processes

#[allow(unconditional_panic)]
fn main() {
    let y = 0;
    let _z = 1 % y;
}