2022-03-03 00:20:27 +00:00
|
|
|
error: this operation will panic at runtime
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/modulo_one.rs:15:5
|
2020-12-06 14:01:03 +00:00
|
|
|
|
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | i32::MIN % (-1);
|
2023-05-17 10:30:14 +00:00
|
|
|
| ^^^^^^^^^^^^^^^ attempt to compute `i32::MIN % -1_i32`, which would overflow
|
2020-12-06 14:01:03 +00:00
|
|
|
|
|
2022-03-03 00:20:27 +00:00
|
|
|
= note: `#[deny(unconditional_panic)]` on by default
|
2020-12-06 14:01:03 +00:00
|
|
|
|
2022-03-03 00:20:27 +00:00
|
|
|
error: this operation will panic at runtime
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/modulo_one.rs:33:5
|
2020-12-06 14:01:03 +00:00
|
|
|
|
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | INT_MIN % NEG_ONE;
|
2023-05-17 10:30:14 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^ attempt to compute `i64::MIN % -1_i64`, which would overflow
|
2020-12-06 14:01:03 +00:00
|
|
|
|
2017-05-17 12:19:44 +00:00
|
|
|
error: any number modulo 1 will be 0
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/modulo_one.rs:8:5
|
2018-10-06 16:18:06 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 10 % 1;
|
2018-10-06 16:18:06 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::modulo-one` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::modulo_one)]`
|
2017-05-17 12:19:44 +00:00
|
|
|
|
2020-12-06 14:01:03 +00:00
|
|
|
error: any number modulo -1 will panic/overflow or result in 0
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/modulo_one.rs:11:5
|
2020-12-06 14:01:03 +00:00
|
|
|
|
|
|
|
|
LL | 10 % -1;
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: any number modulo -1 will panic/overflow or result in 0
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/modulo_one.rs:15:5
|
2020-12-06 14:01:03 +00:00
|
|
|
|
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | i32::MIN % (-1);
|
2020-12-06 14:01:03 +00:00
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
2019-09-09 15:01:01 +00:00
|
|
|
error: any number modulo 1 will be 0
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/modulo_one.rs:24:5
|
2019-09-09 15:01:01 +00:00
|
|
|
|
|
|
|
|
LL | 2 % ONE;
|
|
|
|
| ^^^^^^^
|
|
|
|
|
2020-12-06 14:01:03 +00:00
|
|
|
error: any number modulo -1 will panic/overflow or result in 0
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/modulo_one.rs:28:5
|
2020-12-06 14:01:03 +00:00
|
|
|
|
|
|
|
|
LL | 2 % NEG_ONE;
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: any number modulo -1 will panic/overflow or result in 0
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/modulo_one.rs:33:5
|
2020-12-06 14:01:03 +00:00
|
|
|
|
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | INT_MIN % NEG_ONE;
|
2020-12-06 14:01:03 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
2024-01-08 09:41:48 +00:00
|
|
|
error: aborting due to 8 previous errors
|
2018-01-16 16:06:27 +00:00
|
|
|
|