fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: this operation will panic at runtime 2 --> $DIR/modulo_one.rs:15:5 3 | 4LL | i32::MIN % (-1); 5 | ^^^^^^^^^^^^^^^ attempt to compute `i32::MIN % -1_i32`, which would overflow 6 | 7 = note: `#[deny(unconditional_panic)]` on by default 8 9error: this operation will panic at runtime 10 --> $DIR/modulo_one.rs:33:5 11 | 12LL | INT_MIN % NEG_ONE; 13 | ^^^^^^^^^^^^^^^^^ attempt to compute `i64::MIN % -1_i64`, which would overflow 14 15error: this operation will panic at runtime 16 --> $DIR/modulo_one.rs:37:5 17 | 18LL | INT_MIN % STATIC_NEG_ONE; 19 | ^^^^^^^^^^^^^^^^^^^^^^^^ attempt to compute `i64::MIN % -1_i64`, which would overflow 20 21error: any number modulo 1 will be 0 22 --> $DIR/modulo_one.rs:8:5 23 | 24LL | 10 % 1; 25 | ^^^^^^ 26 | 27 = note: `-D clippy::modulo-one` implied by `-D warnings` 28 = help: to override `-D warnings` add `#[allow(clippy::modulo_one)]` 29 30error: any number modulo -1 will panic/overflow or result in 0 31 --> $DIR/modulo_one.rs:11:5 32 | 33LL | 10 % -1; 34 | ^^^^^^^ 35 36error: any number modulo -1 will panic/overflow or result in 0 37 --> $DIR/modulo_one.rs:15:5 38 | 39LL | i32::MIN % (-1); 40 | ^^^^^^^^^^^^^^^ 41 42error: any number modulo 1 will be 0 43 --> $DIR/modulo_one.rs:24:5 44 | 45LL | 2 % ONE; 46 | ^^^^^^^ 47 48error: any number modulo -1 will panic/overflow or result in 0 49 --> $DIR/modulo_one.rs:28:5 50 | 51LL | 2 % NEG_ONE; 52 | ^^^^^^^^^^^ 53 54error: any number modulo -1 will panic/overflow or result in 0 55 --> $DIR/modulo_one.rs:33:5 56 | 57LL | INT_MIN % NEG_ONE; 58 | ^^^^^^^^^^^^^^^^^ 59 60error: aborting due to 9 previous errors 61