1 error: this arithmetic operation will overflow
2 --> $DIR/modulo_one.rs:11:5
4 LL | i32::MIN % (-1); // also caught by rustc
5 | ^^^^^^^^^^^^^^^ attempt to compute the remainder of `i32::MIN % -1_i32`, which would overflow
7 = note: `#[deny(arithmetic_overflow)]` on by default
9 error: this arithmetic operation will overflow
10 --> $DIR/modulo_one.rs:21:5
12 LL | INT_MIN % NEG_ONE; // also caught by rustc
13 | ^^^^^^^^^^^^^^^^^ attempt to compute the remainder of `i64::MIN % -1_i64`, which would overflow
15 error: this arithmetic operation will overflow
16 --> $DIR/modulo_one.rs:22:5
18 LL | INT_MIN % STATIC_NEG_ONE; // ONLY caught by rustc
19 | ^^^^^^^^^^^^^^^^^^^^^^^^ attempt to compute the remainder of `i64::MIN % -1_i64`, which would overflow
21 error: any number modulo 1 will be 0
22 --> $DIR/modulo_one.rs:8:5
27 = note: `-D clippy::modulo-one` implied by `-D warnings`
29 error: any number modulo -1 will panic/overflow or result in 0
30 --> $DIR/modulo_one.rs:9:5
35 error: any number modulo -1 will panic/overflow or result in 0
36 --> $DIR/modulo_one.rs:11:5
38 LL | i32::MIN % (-1); // also caught by rustc
41 error: the operation is ineffective. Consider reducing it to `1`
42 --> $DIR/modulo_one.rs:13:22
44 LL | const ONE: u32 = 1 * 1;
47 = note: `-D clippy::identity-op` implied by `-D warnings`
49 error: any number modulo 1 will be 0
50 --> $DIR/modulo_one.rs:17:5
55 error: any number modulo -1 will panic/overflow or result in 0
56 --> $DIR/modulo_one.rs:19:5
61 error: any number modulo -1 will panic/overflow or result in 0
62 --> $DIR/modulo_one.rs:21:5
64 LL | INT_MIN % NEG_ONE; // also caught by rustc
67 error: aborting due to 10 previous errors