]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/modulo_arithmetic_integral_const.stderr
11b5f77461ba2e93b94779543f77b8770ffbf440
[rust.git] / src / tools / clippy / tests / ui / modulo_arithmetic_integral_const.stderr
1 error: you are using modulo operator on constants with different signs: `-1 % 2`
2   --> $DIR/modulo_arithmetic_integral_const.rs:11:5
3    |
4 LL |     -1 % 2;
5    |     ^^^^^^
6    |
7    = note: `-D clippy::modulo-arithmetic` implied by `-D warnings`
8    = note: double check for expected result especially when interoperating with different languages
9    = note: or consider using `rem_euclid` or similar function
10
11 error: you are using modulo operator on constants with different signs: `1 % -2`
12   --> $DIR/modulo_arithmetic_integral_const.rs:12:5
13    |
14 LL |     1 % -2;
15    |     ^^^^^^
16    |
17    = note: double check for expected result especially when interoperating with different languages
18    = note: or consider using `rem_euclid` or similar function
19
20 error: you are using modulo operator on constants with different signs: `-1 % 3`
21   --> $DIR/modulo_arithmetic_integral_const.rs:13:5
22    |
23 LL |     (1 - 2) % (1 + 2);
24    |     ^^^^^^^^^^^^^^^^^
25    |
26    = note: double check for expected result especially when interoperating with different languages
27    = note: or consider using `rem_euclid` or similar function
28
29 error: you are using modulo operator on constants with different signs: `3 % -1`
30   --> $DIR/modulo_arithmetic_integral_const.rs:14:5
31    |
32 LL |     (1 + 2) % (1 - 2);
33    |     ^^^^^^^^^^^^^^^^^
34    |
35    = note: double check for expected result especially when interoperating with different languages
36    = note: or consider using `rem_euclid` or similar function
37
38 error: you are using modulo operator on constants with different signs: `-35 % 300000`
39   --> $DIR/modulo_arithmetic_integral_const.rs:15:5
40    |
41 LL |     35 * (7 - 4 * 2) % (-500 * -600);
42    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43    |
44    = note: double check for expected result especially when interoperating with different languages
45    = note: or consider using `rem_euclid` or similar function
46
47 error: you are using modulo operator on constants with different signs: `-1 % 2`
48   --> $DIR/modulo_arithmetic_integral_const.rs:17:5
49    |
50 LL |     -1i8 % 2i8;
51    |     ^^^^^^^^^^
52    |
53    = note: double check for expected result especially when interoperating with different languages
54    = note: or consider using `rem_euclid` or similar function
55
56 error: you are using modulo operator on constants with different signs: `1 % -2`
57   --> $DIR/modulo_arithmetic_integral_const.rs:18:5
58    |
59 LL |     1i8 % -2i8;
60    |     ^^^^^^^^^^
61    |
62    = note: double check for expected result especially when interoperating with different languages
63    = note: or consider using `rem_euclid` or similar function
64
65 error: you are using modulo operator on constants with different signs: `-1 % 2`
66   --> $DIR/modulo_arithmetic_integral_const.rs:19:5
67    |
68 LL |     -1i16 % 2i16;
69    |     ^^^^^^^^^^^^
70    |
71    = note: double check for expected result especially when interoperating with different languages
72    = note: or consider using `rem_euclid` or similar function
73
74 error: you are using modulo operator on constants with different signs: `1 % -2`
75   --> $DIR/modulo_arithmetic_integral_const.rs:20:5
76    |
77 LL |     1i16 % -2i16;
78    |     ^^^^^^^^^^^^
79    |
80    = note: double check for expected result especially when interoperating with different languages
81    = note: or consider using `rem_euclid` or similar function
82
83 error: you are using modulo operator on constants with different signs: `-1 % 2`
84   --> $DIR/modulo_arithmetic_integral_const.rs:21:5
85    |
86 LL |     -1i32 % 2i32;
87    |     ^^^^^^^^^^^^
88    |
89    = note: double check for expected result especially when interoperating with different languages
90    = note: or consider using `rem_euclid` or similar function
91
92 error: you are using modulo operator on constants with different signs: `1 % -2`
93   --> $DIR/modulo_arithmetic_integral_const.rs:22:5
94    |
95 LL |     1i32 % -2i32;
96    |     ^^^^^^^^^^^^
97    |
98    = note: double check for expected result especially when interoperating with different languages
99    = note: or consider using `rem_euclid` or similar function
100
101 error: you are using modulo operator on constants with different signs: `-1 % 2`
102   --> $DIR/modulo_arithmetic_integral_const.rs:23:5
103    |
104 LL |     -1i64 % 2i64;
105    |     ^^^^^^^^^^^^
106    |
107    = note: double check for expected result especially when interoperating with different languages
108    = note: or consider using `rem_euclid` or similar function
109
110 error: you are using modulo operator on constants with different signs: `1 % -2`
111   --> $DIR/modulo_arithmetic_integral_const.rs:24:5
112    |
113 LL |     1i64 % -2i64;
114    |     ^^^^^^^^^^^^
115    |
116    = note: double check for expected result especially when interoperating with different languages
117    = note: or consider using `rem_euclid` or similar function
118
119 error: you are using modulo operator on constants with different signs: `-1 % 2`
120   --> $DIR/modulo_arithmetic_integral_const.rs:25:5
121    |
122 LL |     -1i128 % 2i128;
123    |     ^^^^^^^^^^^^^^
124    |
125    = note: double check for expected result especially when interoperating with different languages
126    = note: or consider using `rem_euclid` or similar function
127
128 error: you are using modulo operator on constants with different signs: `1 % -2`
129   --> $DIR/modulo_arithmetic_integral_const.rs:26:5
130    |
131 LL |     1i128 % -2i128;
132    |     ^^^^^^^^^^^^^^
133    |
134    = note: double check for expected result especially when interoperating with different languages
135    = note: or consider using `rem_euclid` or similar function
136
137 error: you are using modulo operator on constants with different signs: `-1 % 2`
138   --> $DIR/modulo_arithmetic_integral_const.rs:27:5
139    |
140 LL |     -1isize % 2isize;
141    |     ^^^^^^^^^^^^^^^^
142    |
143    = note: double check for expected result especially when interoperating with different languages
144    = note: or consider using `rem_euclid` or similar function
145
146 error: you are using modulo operator on constants with different signs: `1 % -2`
147   --> $DIR/modulo_arithmetic_integral_const.rs:28:5
148    |
149 LL |     1isize % -2isize;
150    |     ^^^^^^^^^^^^^^^^
151    |
152    = note: double check for expected result especially when interoperating with different languages
153    = note: or consider using `rem_euclid` or similar function
154
155 error: aborting due to 17 previous errors
156