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

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