]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/arithmetic_side_effects.stderr
17a2448fbfcad911a7a8db64d665c0329b16ff10
[rustc.git] / src / tools / clippy / tests / ui / arithmetic_side_effects.stderr
1 error: arithmetic operation that can potentially result in unexpected side-effects
2 --> $DIR/arithmetic_side_effects.rs:270:5
3 |
4 LL | _n += 1;
5 | ^^^^^^^
6 |
7 = note: `-D clippy::arithmetic-side-effects` implied by `-D warnings`
8
9 error: arithmetic operation that can potentially result in unexpected side-effects
10 --> $DIR/arithmetic_side_effects.rs:271:5
11 |
12 LL | _n += &1;
13 | ^^^^^^^^
14
15 error: arithmetic operation that can potentially result in unexpected side-effects
16 --> $DIR/arithmetic_side_effects.rs:272:5
17 |
18 LL | _n -= 1;
19 | ^^^^^^^
20
21 error: arithmetic operation that can potentially result in unexpected side-effects
22 --> $DIR/arithmetic_side_effects.rs:273:5
23 |
24 LL | _n -= &1;
25 | ^^^^^^^^
26
27 error: arithmetic operation that can potentially result in unexpected side-effects
28 --> $DIR/arithmetic_side_effects.rs:274:5
29 |
30 LL | _n /= 0;
31 | ^^^^^^^
32
33 error: arithmetic operation that can potentially result in unexpected side-effects
34 --> $DIR/arithmetic_side_effects.rs:275:5
35 |
36 LL | _n /= &0;
37 | ^^^^^^^^
38
39 error: arithmetic operation that can potentially result in unexpected side-effects
40 --> $DIR/arithmetic_side_effects.rs:276:5
41 |
42 LL | _n %= 0;
43 | ^^^^^^^
44
45 error: arithmetic operation that can potentially result in unexpected side-effects
46 --> $DIR/arithmetic_side_effects.rs:277:5
47 |
48 LL | _n %= &0;
49 | ^^^^^^^^
50
51 error: arithmetic operation that can potentially result in unexpected side-effects
52 --> $DIR/arithmetic_side_effects.rs:278:5
53 |
54 LL | _n *= 2;
55 | ^^^^^^^
56
57 error: arithmetic operation that can potentially result in unexpected side-effects
58 --> $DIR/arithmetic_side_effects.rs:279:5
59 |
60 LL | _n *= &2;
61 | ^^^^^^^^
62
63 error: arithmetic operation that can potentially result in unexpected side-effects
64 --> $DIR/arithmetic_side_effects.rs:280:5
65 |
66 LL | _n += -1;
67 | ^^^^^^^^
68
69 error: arithmetic operation that can potentially result in unexpected side-effects
70 --> $DIR/arithmetic_side_effects.rs:281:5
71 |
72 LL | _n += &-1;
73 | ^^^^^^^^^
74
75 error: arithmetic operation that can potentially result in unexpected side-effects
76 --> $DIR/arithmetic_side_effects.rs:282:5
77 |
78 LL | _n -= -1;
79 | ^^^^^^^^
80
81 error: arithmetic operation that can potentially result in unexpected side-effects
82 --> $DIR/arithmetic_side_effects.rs:283:5
83 |
84 LL | _n -= &-1;
85 | ^^^^^^^^^
86
87 error: arithmetic operation that can potentially result in unexpected side-effects
88 --> $DIR/arithmetic_side_effects.rs:284:5
89 |
90 LL | _n /= -0;
91 | ^^^^^^^^
92
93 error: arithmetic operation that can potentially result in unexpected side-effects
94 --> $DIR/arithmetic_side_effects.rs:285:5
95 |
96 LL | _n /= &-0;
97 | ^^^^^^^^^
98
99 error: arithmetic operation that can potentially result in unexpected side-effects
100 --> $DIR/arithmetic_side_effects.rs:286:5
101 |
102 LL | _n %= -0;
103 | ^^^^^^^^
104
105 error: arithmetic operation that can potentially result in unexpected side-effects
106 --> $DIR/arithmetic_side_effects.rs:287:5
107 |
108 LL | _n %= &-0;
109 | ^^^^^^^^^
110
111 error: arithmetic operation that can potentially result in unexpected side-effects
112 --> $DIR/arithmetic_side_effects.rs:288:5
113 |
114 LL | _n *= -2;
115 | ^^^^^^^^
116
117 error: arithmetic operation that can potentially result in unexpected side-effects
118 --> $DIR/arithmetic_side_effects.rs:289:5
119 |
120 LL | _n *= &-2;
121 | ^^^^^^^^^
122
123 error: arithmetic operation that can potentially result in unexpected side-effects
124 --> $DIR/arithmetic_side_effects.rs:290:5
125 |
126 LL | _custom += Custom;
127 | ^^^^^^^^^^^^^^^^^
128
129 error: arithmetic operation that can potentially result in unexpected side-effects
130 --> $DIR/arithmetic_side_effects.rs:291:5
131 |
132 LL | _custom += &Custom;
133 | ^^^^^^^^^^^^^^^^^^
134
135 error: arithmetic operation that can potentially result in unexpected side-effects
136 --> $DIR/arithmetic_side_effects.rs:292:5
137 |
138 LL | _custom -= Custom;
139 | ^^^^^^^^^^^^^^^^^
140
141 error: arithmetic operation that can potentially result in unexpected side-effects
142 --> $DIR/arithmetic_side_effects.rs:293:5
143 |
144 LL | _custom -= &Custom;
145 | ^^^^^^^^^^^^^^^^^^
146
147 error: arithmetic operation that can potentially result in unexpected side-effects
148 --> $DIR/arithmetic_side_effects.rs:294:5
149 |
150 LL | _custom /= Custom;
151 | ^^^^^^^^^^^^^^^^^
152
153 error: arithmetic operation that can potentially result in unexpected side-effects
154 --> $DIR/arithmetic_side_effects.rs:295:5
155 |
156 LL | _custom /= &Custom;
157 | ^^^^^^^^^^^^^^^^^^
158
159 error: arithmetic operation that can potentially result in unexpected side-effects
160 --> $DIR/arithmetic_side_effects.rs:296:5
161 |
162 LL | _custom %= Custom;
163 | ^^^^^^^^^^^^^^^^^
164
165 error: arithmetic operation that can potentially result in unexpected side-effects
166 --> $DIR/arithmetic_side_effects.rs:297:5
167 |
168 LL | _custom %= &Custom;
169 | ^^^^^^^^^^^^^^^^^^
170
171 error: arithmetic operation that can potentially result in unexpected side-effects
172 --> $DIR/arithmetic_side_effects.rs:298:5
173 |
174 LL | _custom *= Custom;
175 | ^^^^^^^^^^^^^^^^^
176
177 error: arithmetic operation that can potentially result in unexpected side-effects
178 --> $DIR/arithmetic_side_effects.rs:299:5
179 |
180 LL | _custom *= &Custom;
181 | ^^^^^^^^^^^^^^^^^^
182
183 error: arithmetic operation that can potentially result in unexpected side-effects
184 --> $DIR/arithmetic_side_effects.rs:300:5
185 |
186 LL | _custom += -Custom;
187 | ^^^^^^^^^^^^^^^^^^
188
189 error: arithmetic operation that can potentially result in unexpected side-effects
190 --> $DIR/arithmetic_side_effects.rs:301:5
191 |
192 LL | _custom += &-Custom;
193 | ^^^^^^^^^^^^^^^^^^^
194
195 error: arithmetic operation that can potentially result in unexpected side-effects
196 --> $DIR/arithmetic_side_effects.rs:302:5
197 |
198 LL | _custom -= -Custom;
199 | ^^^^^^^^^^^^^^^^^^
200
201 error: arithmetic operation that can potentially result in unexpected side-effects
202 --> $DIR/arithmetic_side_effects.rs:303:5
203 |
204 LL | _custom -= &-Custom;
205 | ^^^^^^^^^^^^^^^^^^^
206
207 error: arithmetic operation that can potentially result in unexpected side-effects
208 --> $DIR/arithmetic_side_effects.rs:304:5
209 |
210 LL | _custom /= -Custom;
211 | ^^^^^^^^^^^^^^^^^^
212
213 error: arithmetic operation that can potentially result in unexpected side-effects
214 --> $DIR/arithmetic_side_effects.rs:305:5
215 |
216 LL | _custom /= &-Custom;
217 | ^^^^^^^^^^^^^^^^^^^
218
219 error: arithmetic operation that can potentially result in unexpected side-effects
220 --> $DIR/arithmetic_side_effects.rs:306:5
221 |
222 LL | _custom %= -Custom;
223 | ^^^^^^^^^^^^^^^^^^
224
225 error: arithmetic operation that can potentially result in unexpected side-effects
226 --> $DIR/arithmetic_side_effects.rs:307:5
227 |
228 LL | _custom %= &-Custom;
229 | ^^^^^^^^^^^^^^^^^^^
230
231 error: arithmetic operation that can potentially result in unexpected side-effects
232 --> $DIR/arithmetic_side_effects.rs:308:5
233 |
234 LL | _custom *= -Custom;
235 | ^^^^^^^^^^^^^^^^^^
236
237 error: arithmetic operation that can potentially result in unexpected side-effects
238 --> $DIR/arithmetic_side_effects.rs:309:5
239 |
240 LL | _custom *= &-Custom;
241 | ^^^^^^^^^^^^^^^^^^^
242
243 error: arithmetic operation that can potentially result in unexpected side-effects
244 --> $DIR/arithmetic_side_effects.rs:312:10
245 |
246 LL | _n = _n + 1;
247 | ^^^^^^
248
249 error: arithmetic operation that can potentially result in unexpected side-effects
250 --> $DIR/arithmetic_side_effects.rs:313:10
251 |
252 LL | _n = _n + &1;
253 | ^^^^^^^
254
255 error: arithmetic operation that can potentially result in unexpected side-effects
256 --> $DIR/arithmetic_side_effects.rs:314:10
257 |
258 LL | _n = 1 + _n;
259 | ^^^^^^
260
261 error: arithmetic operation that can potentially result in unexpected side-effects
262 --> $DIR/arithmetic_side_effects.rs:315:10
263 |
264 LL | _n = &1 + _n;
265 | ^^^^^^^
266
267 error: arithmetic operation that can potentially result in unexpected side-effects
268 --> $DIR/arithmetic_side_effects.rs:316:10
269 |
270 LL | _n = _n - 1;
271 | ^^^^^^
272
273 error: arithmetic operation that can potentially result in unexpected side-effects
274 --> $DIR/arithmetic_side_effects.rs:317:10
275 |
276 LL | _n = _n - &1;
277 | ^^^^^^^
278
279 error: arithmetic operation that can potentially result in unexpected side-effects
280 --> $DIR/arithmetic_side_effects.rs:318:10
281 |
282 LL | _n = 1 - _n;
283 | ^^^^^^
284
285 error: arithmetic operation that can potentially result in unexpected side-effects
286 --> $DIR/arithmetic_side_effects.rs:319:10
287 |
288 LL | _n = &1 - _n;
289 | ^^^^^^^
290
291 error: arithmetic operation that can potentially result in unexpected side-effects
292 --> $DIR/arithmetic_side_effects.rs:320:10
293 |
294 LL | _n = _n / 0;
295 | ^^^^^^
296
297 error: arithmetic operation that can potentially result in unexpected side-effects
298 --> $DIR/arithmetic_side_effects.rs:321:10
299 |
300 LL | _n = _n / &0;
301 | ^^^^^^^
302
303 error: arithmetic operation that can potentially result in unexpected side-effects
304 --> $DIR/arithmetic_side_effects.rs:322:10
305 |
306 LL | _n = _n % 0;
307 | ^^^^^^
308
309 error: arithmetic operation that can potentially result in unexpected side-effects
310 --> $DIR/arithmetic_side_effects.rs:323:10
311 |
312 LL | _n = _n % &0;
313 | ^^^^^^^
314
315 error: arithmetic operation that can potentially result in unexpected side-effects
316 --> $DIR/arithmetic_side_effects.rs:324:10
317 |
318 LL | _n = _n * 2;
319 | ^^^^^^
320
321 error: arithmetic operation that can potentially result in unexpected side-effects
322 --> $DIR/arithmetic_side_effects.rs:325:10
323 |
324 LL | _n = _n * &2;
325 | ^^^^^^^
326
327 error: arithmetic operation that can potentially result in unexpected side-effects
328 --> $DIR/arithmetic_side_effects.rs:326:10
329 |
330 LL | _n = 2 * _n;
331 | ^^^^^^
332
333 error: arithmetic operation that can potentially result in unexpected side-effects
334 --> $DIR/arithmetic_side_effects.rs:327:10
335 |
336 LL | _n = &2 * _n;
337 | ^^^^^^^
338
339 error: arithmetic operation that can potentially result in unexpected side-effects
340 --> $DIR/arithmetic_side_effects.rs:328:10
341 |
342 LL | _n = 23 + &85;
343 | ^^^^^^^^
344
345 error: arithmetic operation that can potentially result in unexpected side-effects
346 --> $DIR/arithmetic_side_effects.rs:329:10
347 |
348 LL | _n = &23 + 85;
349 | ^^^^^^^^
350
351 error: arithmetic operation that can potentially result in unexpected side-effects
352 --> $DIR/arithmetic_side_effects.rs:330:10
353 |
354 LL | _n = &23 + &85;
355 | ^^^^^^^^^
356
357 error: arithmetic operation that can potentially result in unexpected side-effects
358 --> $DIR/arithmetic_side_effects.rs:331:15
359 |
360 LL | _custom = _custom + _custom;
361 | ^^^^^^^^^^^^^^^^^
362
363 error: arithmetic operation that can potentially result in unexpected side-effects
364 --> $DIR/arithmetic_side_effects.rs:332:15
365 |
366 LL | _custom = _custom + &_custom;
367 | ^^^^^^^^^^^^^^^^^^
368
369 error: arithmetic operation that can potentially result in unexpected side-effects
370 --> $DIR/arithmetic_side_effects.rs:333:15
371 |
372 LL | _custom = Custom + _custom;
373 | ^^^^^^^^^^^^^^^^
374
375 error: arithmetic operation that can potentially result in unexpected side-effects
376 --> $DIR/arithmetic_side_effects.rs:334:15
377 |
378 LL | _custom = &Custom + _custom;
379 | ^^^^^^^^^^^^^^^^^
380
381 error: arithmetic operation that can potentially result in unexpected side-effects
382 --> $DIR/arithmetic_side_effects.rs:335:15
383 |
384 LL | _custom = _custom - Custom;
385 | ^^^^^^^^^^^^^^^^
386
387 error: arithmetic operation that can potentially result in unexpected side-effects
388 --> $DIR/arithmetic_side_effects.rs:336:15
389 |
390 LL | _custom = _custom - &Custom;
391 | ^^^^^^^^^^^^^^^^^
392
393 error: arithmetic operation that can potentially result in unexpected side-effects
394 --> $DIR/arithmetic_side_effects.rs:337:15
395 |
396 LL | _custom = Custom - _custom;
397 | ^^^^^^^^^^^^^^^^
398
399 error: arithmetic operation that can potentially result in unexpected side-effects
400 --> $DIR/arithmetic_side_effects.rs:338:15
401 |
402 LL | _custom = &Custom - _custom;
403 | ^^^^^^^^^^^^^^^^^
404
405 error: arithmetic operation that can potentially result in unexpected side-effects
406 --> $DIR/arithmetic_side_effects.rs:339:15
407 |
408 LL | _custom = _custom / Custom;
409 | ^^^^^^^^^^^^^^^^
410
411 error: arithmetic operation that can potentially result in unexpected side-effects
412 --> $DIR/arithmetic_side_effects.rs:340:15
413 |
414 LL | _custom = _custom / &Custom;
415 | ^^^^^^^^^^^^^^^^^
416
417 error: arithmetic operation that can potentially result in unexpected side-effects
418 --> $DIR/arithmetic_side_effects.rs:341:15
419 |
420 LL | _custom = _custom % Custom;
421 | ^^^^^^^^^^^^^^^^
422
423 error: arithmetic operation that can potentially result in unexpected side-effects
424 --> $DIR/arithmetic_side_effects.rs:342:15
425 |
426 LL | _custom = _custom % &Custom;
427 | ^^^^^^^^^^^^^^^^^
428
429 error: arithmetic operation that can potentially result in unexpected side-effects
430 --> $DIR/arithmetic_side_effects.rs:343:15
431 |
432 LL | _custom = _custom * Custom;
433 | ^^^^^^^^^^^^^^^^
434
435 error: arithmetic operation that can potentially result in unexpected side-effects
436 --> $DIR/arithmetic_side_effects.rs:344:15
437 |
438 LL | _custom = _custom * &Custom;
439 | ^^^^^^^^^^^^^^^^^
440
441 error: arithmetic operation that can potentially result in unexpected side-effects
442 --> $DIR/arithmetic_side_effects.rs:345:15
443 |
444 LL | _custom = Custom * _custom;
445 | ^^^^^^^^^^^^^^^^
446
447 error: arithmetic operation that can potentially result in unexpected side-effects
448 --> $DIR/arithmetic_side_effects.rs:346:15
449 |
450 LL | _custom = &Custom * _custom;
451 | ^^^^^^^^^^^^^^^^^
452
453 error: arithmetic operation that can potentially result in unexpected side-effects
454 --> $DIR/arithmetic_side_effects.rs:347:15
455 |
456 LL | _custom = Custom + &Custom;
457 | ^^^^^^^^^^^^^^^^
458
459 error: arithmetic operation that can potentially result in unexpected side-effects
460 --> $DIR/arithmetic_side_effects.rs:348:15
461 |
462 LL | _custom = &Custom + Custom;
463 | ^^^^^^^^^^^^^^^^
464
465 error: arithmetic operation that can potentially result in unexpected side-effects
466 --> $DIR/arithmetic_side_effects.rs:349:15
467 |
468 LL | _custom = &Custom + &Custom;
469 | ^^^^^^^^^^^^^^^^^
470
471 error: arithmetic operation that can potentially result in unexpected side-effects
472 --> $DIR/arithmetic_side_effects.rs:352:10
473 |
474 LL | _n = -_n;
475 | ^^^
476
477 error: arithmetic operation that can potentially result in unexpected side-effects
478 --> $DIR/arithmetic_side_effects.rs:353:10
479 |
480 LL | _n = -&_n;
481 | ^^^^
482
483 error: arithmetic operation that can potentially result in unexpected side-effects
484 --> $DIR/arithmetic_side_effects.rs:354:15
485 |
486 LL | _custom = -_custom;
487 | ^^^^^^^^
488
489 error: arithmetic operation that can potentially result in unexpected side-effects
490 --> $DIR/arithmetic_side_effects.rs:355:15
491 |
492 LL | _custom = -&_custom;
493 | ^^^^^^^^^
494
495 error: arithmetic operation that can potentially result in unexpected side-effects
496 --> $DIR/arithmetic_side_effects.rs:364:5
497 |
498 LL | 1 + i;
499 | ^^^^^
500
501 error: arithmetic operation that can potentially result in unexpected side-effects
502 --> $DIR/arithmetic_side_effects.rs:365:5
503 |
504 LL | i * 2;
505 | ^^^^^
506
507 error: arithmetic operation that can potentially result in unexpected side-effects
508 --> $DIR/arithmetic_side_effects.rs:367:5
509 |
510 LL | i - 2 + 2 - i;
511 | ^^^^^^^^^^^^^
512
513 error: arithmetic operation that can potentially result in unexpected side-effects
514 --> $DIR/arithmetic_side_effects.rs:368:5
515 |
516 LL | -i;
517 | ^^
518
519 error: arithmetic operation that can potentially result in unexpected side-effects
520 --> $DIR/arithmetic_side_effects.rs:369:5
521 |
522 LL | i >> 1;
523 | ^^^^^^
524
525 error: arithmetic operation that can potentially result in unexpected side-effects
526 --> $DIR/arithmetic_side_effects.rs:370:5
527 |
528 LL | i << 1;
529 | ^^^^^^
530
531 error: arithmetic operation that can potentially result in unexpected side-effects
532 --> $DIR/arithmetic_side_effects.rs:379:5
533 |
534 LL | i += 1;
535 | ^^^^^^
536
537 error: arithmetic operation that can potentially result in unexpected side-effects
538 --> $DIR/arithmetic_side_effects.rs:380:5
539 |
540 LL | i -= 1;
541 | ^^^^^^
542
543 error: arithmetic operation that can potentially result in unexpected side-effects
544 --> $DIR/arithmetic_side_effects.rs:381:5
545 |
546 LL | i *= 2;
547 | ^^^^^^
548
549 error: arithmetic operation that can potentially result in unexpected side-effects
550 --> $DIR/arithmetic_side_effects.rs:383:5
551 |
552 LL | i /= 0;
553 | ^^^^^^
554
555 error: arithmetic operation that can potentially result in unexpected side-effects
556 --> $DIR/arithmetic_side_effects.rs:385:5
557 |
558 LL | i /= var1;
559 | ^^^^^^^^^
560
561 error: arithmetic operation that can potentially result in unexpected side-effects
562 --> $DIR/arithmetic_side_effects.rs:386:5
563 |
564 LL | i /= var2;
565 | ^^^^^^^^^
566
567 error: arithmetic operation that can potentially result in unexpected side-effects
568 --> $DIR/arithmetic_side_effects.rs:388:5
569 |
570 LL | i %= 0;
571 | ^^^^^^
572
573 error: arithmetic operation that can potentially result in unexpected side-effects
574 --> $DIR/arithmetic_side_effects.rs:390:5
575 |
576 LL | i %= var1;
577 | ^^^^^^^^^
578
579 error: arithmetic operation that can potentially result in unexpected side-effects
580 --> $DIR/arithmetic_side_effects.rs:391:5
581 |
582 LL | i %= var2;
583 | ^^^^^^^^^
584
585 error: arithmetic operation that can potentially result in unexpected side-effects
586 --> $DIR/arithmetic_side_effects.rs:392:5
587 |
588 LL | i <<= 3;
589 | ^^^^^^^
590
591 error: arithmetic operation that can potentially result in unexpected side-effects
592 --> $DIR/arithmetic_side_effects.rs:393:5
593 |
594 LL | i >>= 2;
595 | ^^^^^^^
596
597 error: aborting due to 99 previous errors
598