about summary refs log tree commit diff
path: root/src/test/ui/numbers-arithmetic/mod-zero.rs
blob: a2798175d68e41774be81e76f1fabea0d33bef45 (plain)
1
2
3
4
5
6
7
// run-fail
// error-pattern:attempt to calculate the remainder with a divisor of zero
#[allow(unconditional_panic)]
fn main() {
    let y = 0;
    let _z = 1 % y;
}