fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: variable appears on both sides of an assignment operation 2 --> $DIR/assign_ops2.rs:8:5 3 | 4LL | a += a + 1; 5 | ^^^^^^^^^^ 6 | 7 = note: `-D clippy::misrefactored-assign-op` implied by `-D warnings` 8 = help: to override `-D warnings` add `#[allow(clippy::misrefactored_assign_op)]` 9help: did you mean `a = a + 1` or `a = a + a + 1`? Consider replacing it with 10 | 11LL | a += 1; 12 | ~~~~~~ 13help: or 14 | 15LL | a = a + a + 1; 16 | ~~~~~~~~~~~~~ 17 18error: variable appears on both sides of an assignment operation 19 --> $DIR/assign_ops2.rs:11:5 20 | 21LL | a += 1 + a; 22 | ^^^^^^^^^^ 23 | 24help: did you mean `a = a + 1` or `a = a + 1 + a`? Consider replacing it with 25 | 26LL | a += 1; 27 | ~~~~~~ 28help: or 29 | 30LL | a = a + 1 + a; 31 | ~~~~~~~~~~~~~ 32 33error: variable appears on both sides of an assignment operation 34 --> $DIR/assign_ops2.rs:13:5 35 | 36LL | a -= a - 1; 37 | ^^^^^^^^^^ 38 | 39help: did you mean `a = a - 1` or `a = a - (a - 1)`? Consider replacing it with 40 | 41LL | a -= 1; 42 | ~~~~~~ 43help: or 44 | 45LL | a = a - (a - 1); 46 | ~~~~~~~~~~~~~~~ 47 48error: variable appears on both sides of an assignment operation 49 --> $DIR/assign_ops2.rs:15:5 50 | 51LL | a *= a * 99; 52 | ^^^^^^^^^^^ 53 | 54help: did you mean `a = a * 99` or `a = a * a * 99`? Consider replacing it with 55 | 56LL | a *= 99; 57 | ~~~~~~~ 58help: or 59 | 60LL | a = a * a * 99; 61 | ~~~~~~~~~~~~~~ 62 63error: variable appears on both sides of an assignment operation 64 --> $DIR/assign_ops2.rs:17:5 65 | 66LL | a *= 42 * a; 67 | ^^^^^^^^^^^ 68 | 69help: did you mean `a = a * 42` or `a = a * 42 * a`? Consider replacing it with 70 | 71LL | a *= 42; 72 | ~~~~~~~ 73help: or 74 | 75LL | a = a * 42 * a; 76 | ~~~~~~~~~~~~~~ 77 78error: variable appears on both sides of an assignment operation 79 --> $DIR/assign_ops2.rs:19:5 80 | 81LL | a /= a / 2; 82 | ^^^^^^^^^^ 83 | 84help: did you mean `a = a / 2` or `a = a / (a / 2)`? Consider replacing it with 85 | 86LL | a /= 2; 87 | ~~~~~~ 88help: or 89 | 90LL | a = a / (a / 2); 91 | ~~~~~~~~~~~~~~~ 92 93error: variable appears on both sides of an assignment operation 94 --> $DIR/assign_ops2.rs:21:5 95 | 96LL | a %= a % 5; 97 | ^^^^^^^^^^ 98 | 99help: did you mean `a = a % 5` or `a = a % (a % 5)`? Consider replacing it with 100 | 101LL | a %= 5; 102 | ~~~~~~ 103help: or 104 | 105LL | a = a % (a % 5); 106 | ~~~~~~~~~~~~~~~ 107 108error: variable appears on both sides of an assignment operation 109 --> $DIR/assign_ops2.rs:23:5 110 | 111LL | a &= a & 1; 112 | ^^^^^^^^^^ 113 | 114help: did you mean `a = a & 1` or `a = a & a & 1`? Consider replacing it with 115 | 116LL | a &= 1; 117 | ~~~~~~ 118help: or 119 | 120LL | a = a & a & 1; 121 | ~~~~~~~~~~~~~ 122 123error: variable appears on both sides of an assignment operation 124 --> $DIR/assign_ops2.rs:25:5 125 | 126LL | a *= a * a; 127 | ^^^^^^^^^^ 128 | 129help: did you mean `a = a * a` or `a = a * a * a`? Consider replacing it with 130 | 131LL | a *= a; 132 | ~~~~~~ 133help: or 134 | 135LL | a = a * a * a; 136 | ~~~~~~~~~~~~~ 137 138error: manual implementation of an assign operation 139 --> $DIR/assign_ops2.rs:63:5 140 | 141LL | buf = buf + cows.clone(); 142 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `buf += cows.clone()` 143 | 144 = note: `-D clippy::assign-op-pattern` implied by `-D warnings` 145 = help: to override `-D warnings` add `#[allow(clippy::assign_op_pattern)]` 146 147error: aborting due to 10 previous errors 148