]> git.lizzy.rs Git - rust.git/blob - tests/ui/assign_ops2.stderr
992bb4079eab0c117a720e65791fd7a1d59a0835
[rust.git] / tests / ui / assign_ops2.stderr
1 error: variable appears on both sides of an assignment operation
2  --> $DIR/assign_ops2.rs:8:5
3   |
4 8 |     a += a + 1;
5   |     ^^^^^^^^^^
6   |
7   = note: `-D misrefactored-assign-op` implied by `-D warnings`
8 help: Did you mean a = a + 1 or a = a + a + 1? Consider replacing it with
9   |
10 8 |     a += 1;
11   |     ^^^^^^
12
13 error: variable appears on both sides of an assignment operation
14  --> $DIR/assign_ops2.rs:9:5
15   |
16 9 |     a += 1 + a;
17   |     ^^^^^^^^^^
18 help: Did you mean a = a + 1 or a = a + 1 + a? Consider replacing it with
19   |
20 9 |     a += 1;
21   |     ^^^^^^
22
23 error: variable appears on both sides of an assignment operation
24   --> $DIR/assign_ops2.rs:10:5
25    |
26 10 |     a -= a - 1;
27    |     ^^^^^^^^^^
28 help: Did you mean a = a - 1 or a = a - (a - 1)? Consider replacing it with
29    |
30 10 |     a -= 1;
31    |     ^^^^^^
32
33 error: variable appears on both sides of an assignment operation
34   --> $DIR/assign_ops2.rs:11:5
35    |
36 11 |     a *= a * 99;
37    |     ^^^^^^^^^^^
38 help: Did you mean a = a * 99 or a = a * a * 99? Consider replacing it with
39    |
40 11 |     a *= 99;
41    |     ^^^^^^^
42
43 error: variable appears on both sides of an assignment operation
44   --> $DIR/assign_ops2.rs:12:5
45    |
46 12 |     a *= 42 * a;
47    |     ^^^^^^^^^^^
48 help: Did you mean a = a * 42 or a = a * 42 * a? Consider replacing it with
49    |
50 12 |     a *= 42;
51    |     ^^^^^^^
52
53 error: variable appears on both sides of an assignment operation
54   --> $DIR/assign_ops2.rs:13:5
55    |
56 13 |     a /= a / 2;
57    |     ^^^^^^^^^^
58 help: Did you mean a = a / 2 or a = a / (a / 2)? Consider replacing it with
59    |
60 13 |     a /= 2;
61    |     ^^^^^^
62
63 error: variable appears on both sides of an assignment operation
64   --> $DIR/assign_ops2.rs:14:5
65    |
66 14 |     a %= a % 5;
67    |     ^^^^^^^^^^
68 help: Did you mean a = a % 5 or a = a % (a % 5)? Consider replacing it with
69    |
70 14 |     a %= 5;
71    |     ^^^^^^
72
73 error: variable appears on both sides of an assignment operation
74   --> $DIR/assign_ops2.rs:15:5
75    |
76 15 |     a &= a & 1;
77    |     ^^^^^^^^^^
78 help: Did you mean a = a & 1 or a = a & a & 1? Consider replacing it with
79    |
80 15 |     a &= 1;
81    |     ^^^^^^
82
83 error: variable appears on both sides of an assignment operation
84   --> $DIR/assign_ops2.rs:16:5
85    |
86 16 |     a *= a * a;
87    |     ^^^^^^^^^^
88 help: Did you mean a = a * a or a = a * a * a? Consider replacing it with
89    |
90 16 |     a *= a;
91    |     ^^^^^^
92
93 error: aborting due to 9 previous errors
94