2022-03-02 18:20:27 -06:00
|
|
|
error: this operation will panic at runtime
|
2020-12-06 08:01:03 -06:00
|
|
|
--> $DIR/modulo_one.rs:11:5
|
|
|
|
|
|
|
|
|
LL | i32::MIN % (-1); // also caught by rustc
|
|
|
|
| ^^^^^^^^^^^^^^^ attempt to compute the remainder of `i32::MIN % -1_i32`, which would overflow
|
|
|
|
|
|
2022-03-02 18:20:27 -06:00
|
|
|
= note: `#[deny(unconditional_panic)]` on by default
|
2020-12-06 08:01:03 -06:00
|
|
|
|
2022-03-02 18:20:27 -06:00
|
|
|
error: this operation will panic at runtime
|
2020-12-06 08:01:03 -06:00
|
|
|
--> $DIR/modulo_one.rs:21:5
|
|
|
|
|
|
|
|
|
LL | INT_MIN % NEG_ONE; // also caught by rustc
|
|
|
|
| ^^^^^^^^^^^^^^^^^ attempt to compute the remainder of `i64::MIN % -1_i64`, which would overflow
|
|
|
|
|
2022-03-02 18:20:27 -06:00
|
|
|
error: this operation will panic at runtime
|
2020-12-06 08:01:03 -06:00
|
|
|
--> $DIR/modulo_one.rs:22:5
|
|
|
|
|
|
|
|
|
LL | INT_MIN % STATIC_NEG_ONE; // ONLY caught by rustc
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ attempt to compute the remainder of `i64::MIN % -1_i64`, which would overflow
|
|
|
|
|
2017-05-17 07:19:44 -05:00
|
|
|
error: any number modulo 1 will be 0
|
2020-12-06 08:01:03 -06:00
|
|
|
--> $DIR/modulo_one.rs:8:5
|
2018-10-06 11:18:06 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | 10 % 1;
|
2018-10-06 11:18:06 -05:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::modulo-one` implied by `-D warnings`
|
2017-05-17 07:19:44 -05:00
|
|
|
|
2020-12-06 08:01:03 -06:00
|
|
|
error: any number modulo -1 will panic/overflow or result in 0
|
|
|
|
--> $DIR/modulo_one.rs:9:5
|
|
|
|
|
|
|
|
|
LL | 10 % -1;
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: any number modulo -1 will panic/overflow or result in 0
|
|
|
|
--> $DIR/modulo_one.rs:11:5
|
|
|
|
|
|
|
|
|
LL | i32::MIN % (-1); // also caught by rustc
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
2019-09-09 10:01:01 -05:00
|
|
|
error: any number modulo 1 will be 0
|
2020-12-06 08:01:03 -06:00
|
|
|
--> $DIR/modulo_one.rs:17:5
|
2019-09-09 10:01:01 -05:00
|
|
|
|
|
|
|
|
LL | 2 % ONE;
|
|
|
|
| ^^^^^^^
|
|
|
|
|
2020-12-06 08:01:03 -06:00
|
|
|
error: any number modulo -1 will panic/overflow or result in 0
|
|
|
|
--> $DIR/modulo_one.rs:19:5
|
|
|
|
|
|
|
|
|
LL | 2 % NEG_ONE;
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: any number modulo -1 will panic/overflow or result in 0
|
|
|
|
--> $DIR/modulo_one.rs:21:5
|
|
|
|
|
|
|
|
|
LL | INT_MIN % NEG_ONE; // also caught by rustc
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
2022-06-04 06:34:07 -05:00
|
|
|
error: aborting due to 9 previous errors
|
2018-01-16 10:06:27 -06:00
|
|
|
|