]>
Commit | Line | Data |
---|---|---|
f20569fa XL |
1 | error: this arithmetic operation will overflow |
2 | --> $DIR/modulo_one.rs:11:5 | |
3 | | | |
4 | LL | i32::MIN % (-1); // also caught by rustc | |
5 | | ^^^^^^^^^^^^^^^ attempt to compute the remainder of `i32::MIN % -1_i32`, which would overflow | |
6 | | | |
7 | = note: `#[deny(arithmetic_overflow)]` on by default | |
8 | ||
9 | error: this arithmetic operation will overflow | |
10 | --> $DIR/modulo_one.rs:21:5 | |
11 | | | |
12 | LL | INT_MIN % NEG_ONE; // also caught by rustc | |
13 | | ^^^^^^^^^^^^^^^^^ attempt to compute the remainder of `i64::MIN % -1_i64`, which would overflow | |
14 | ||
15 | error: this arithmetic operation will overflow | |
16 | --> $DIR/modulo_one.rs:22:5 | |
17 | | | |
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 | |
20 | ||
21 | error: any number modulo 1 will be 0 | |
22 | --> $DIR/modulo_one.rs:8:5 | |
23 | | | |
24 | LL | 10 % 1; | |
25 | | ^^^^^^ | |
26 | | | |
27 | = note: `-D clippy::modulo-one` implied by `-D warnings` | |
28 | ||
29 | error: any number modulo -1 will panic/overflow or result in 0 | |
30 | --> $DIR/modulo_one.rs:9:5 | |
31 | | | |
32 | LL | 10 % -1; | |
33 | | ^^^^^^^ | |
34 | ||
35 | error: any number modulo -1 will panic/overflow or result in 0 | |
36 | --> $DIR/modulo_one.rs:11:5 | |
37 | | | |
38 | LL | i32::MIN % (-1); // also caught by rustc | |
39 | | ^^^^^^^^^^^^^^^ | |
40 | ||
41 | error: the operation is ineffective. Consider reducing it to `1` | |
42 | --> $DIR/modulo_one.rs:13:22 | |
43 | | | |
44 | LL | const ONE: u32 = 1 * 1; | |
45 | | ^^^^^ | |
46 | | | |
47 | = note: `-D clippy::identity-op` implied by `-D warnings` | |
48 | ||
49 | error: the operation is ineffective. Consider reducing it to `1` | |
50 | --> $DIR/modulo_one.rs:13:22 | |
51 | | | |
52 | LL | const ONE: u32 = 1 * 1; | |
53 | | ^^^^^ | |
54 | ||
55 | error: any number modulo 1 will be 0 | |
56 | --> $DIR/modulo_one.rs:17:5 | |
57 | | | |
58 | LL | 2 % ONE; | |
59 | | ^^^^^^^ | |
60 | ||
61 | error: any number modulo -1 will panic/overflow or result in 0 | |
62 | --> $DIR/modulo_one.rs:19:5 | |
63 | | | |
64 | LL | 2 % NEG_ONE; | |
65 | | ^^^^^^^^^^^ | |
66 | ||
67 | error: any number modulo -1 will panic/overflow or result in 0 | |
68 | --> $DIR/modulo_one.rs:21:5 | |
69 | | | |
70 | LL | INT_MIN % NEG_ONE; // also caught by rustc | |
71 | | ^^^^^^^^^^^^^^^^^ | |
72 | ||
73 | error: aborting due to 11 previous errors | |
74 |