2022-10-03 21:36:12 +00:00
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
|
|
|
--> $DIR/arithmetic_side_effects.rs:78:13
|
|
|
|
|
|
|
|
|
LL | let _ = String::new() + "";
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::arithmetic-side-effects` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
|
|
|
--> $DIR/arithmetic_side_effects.rs:86:27
|
|
|
|
|
|
|
|
|
LL | let inferred_string = string + "";
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
|
|
|
--> $DIR/arithmetic_side_effects.rs:90:13
|
|
|
|
|
|
|
|
|
LL | let _ = inferred_string + "";
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2022-09-15 16:28:18 +00:00
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:165:5
|
2022-09-07 13:00:45 +00:00
|
|
|
|
|
2022-09-15 16:28:18 +00:00
|
|
|
LL | _n += 1;
|
|
|
|
| ^^^^^^^
|
2022-09-07 13:00:45 +00:00
|
|
|
|
2022-09-15 16:28:18 +00:00
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:166:5
|
2022-09-21 18:02:37 +00:00
|
|
|
|
|
|
|
|
LL | _n += &1;
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:167:5
|
2022-09-07 13:00:45 +00:00
|
|
|
|
|
2022-09-15 16:28:18 +00:00
|
|
|
LL | _n -= 1;
|
|
|
|
| ^^^^^^^
|
2022-09-07 13:00:45 +00:00
|
|
|
|
2022-09-15 16:28:18 +00:00
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:168:5
|
2022-09-21 18:02:37 +00:00
|
|
|
|
|
|
|
|
LL | _n -= &1;
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:169:5
|
2022-09-07 13:00:45 +00:00
|
|
|
|
|
2022-09-15 16:28:18 +00:00
|
|
|
LL | _n /= 0;
|
|
|
|
| ^^^^^^^
|
2022-09-07 13:00:45 +00:00
|
|
|
|
2022-09-15 16:28:18 +00:00
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:170:5
|
2022-09-21 18:02:37 +00:00
|
|
|
|
|
|
|
|
LL | _n /= &0;
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:171:5
|
2022-09-13 18:50:24 +00:00
|
|
|
|
|
2022-09-15 16:28:18 +00:00
|
|
|
LL | _n %= 0;
|
2022-09-13 18:50:24 +00:00
|
|
|
| ^^^^^^^
|
|
|
|
|
2022-09-15 16:28:18 +00:00
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:172:5
|
2022-09-21 18:02:37 +00:00
|
|
|
|
|
|
|
|
LL | _n %= &0;
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:173:5
|
2022-09-13 18:50:24 +00:00
|
|
|
|
|
2022-09-15 16:28:18 +00:00
|
|
|
LL | _n *= 2;
|
2022-09-13 18:50:24 +00:00
|
|
|
| ^^^^^^^
|
|
|
|
|
2022-09-15 16:28:18 +00:00
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:174:5
|
2022-09-21 18:02:37 +00:00
|
|
|
|
|
|
|
|
LL | _n *= &2;
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:177:10
|
2022-09-13 18:50:24 +00:00
|
|
|
|
|
2022-09-15 16:28:18 +00:00
|
|
|
LL | _n = _n + 1;
|
|
|
|
| ^^^^^^
|
2022-09-13 18:50:24 +00:00
|
|
|
|
2022-09-15 16:28:18 +00:00
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:178:10
|
2022-09-21 18:02:37 +00:00
|
|
|
|
|
|
|
|
LL | _n = _n + &1;
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:179:10
|
2022-09-13 18:50:24 +00:00
|
|
|
|
|
2022-09-15 16:28:18 +00:00
|
|
|
LL | _n = 1 + _n;
|
|
|
|
| ^^^^^^
|
2022-09-13 18:50:24 +00:00
|
|
|
|
2022-09-15 16:28:18 +00:00
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:180:10
|
2022-09-21 18:02:37 +00:00
|
|
|
|
|
|
|
|
LL | _n = &1 + _n;
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:181:10
|
2022-09-13 18:50:24 +00:00
|
|
|
|
|
2022-09-15 16:28:18 +00:00
|
|
|
LL | _n = _n - 1;
|
|
|
|
| ^^^^^^
|
2022-09-13 18:50:24 +00:00
|
|
|
|
2022-09-15 16:28:18 +00:00
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:182:10
|
2022-09-21 18:02:37 +00:00
|
|
|
|
|
|
|
|
LL | _n = _n - &1;
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:183:10
|
2022-09-13 18:50:24 +00:00
|
|
|
|
|
2022-09-15 16:28:18 +00:00
|
|
|
LL | _n = 1 - _n;
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:184:10
|
2022-09-21 18:02:37 +00:00
|
|
|
|
|
|
|
|
LL | _n = &1 - _n;
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:185:10
|
2022-09-15 16:28:18 +00:00
|
|
|
|
|
|
|
|
LL | _n = _n / 0;
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:186:10
|
2022-09-21 18:02:37 +00:00
|
|
|
|
|
|
|
|
LL | _n = _n / &0;
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:187:10
|
2022-09-15 16:28:18 +00:00
|
|
|
|
|
|
|
|
LL | _n = _n % 0;
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:188:10
|
2022-09-21 18:02:37 +00:00
|
|
|
|
|
|
|
|
LL | _n = _n % &0;
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:189:10
|
2022-09-15 16:28:18 +00:00
|
|
|
|
|
|
|
|
LL | _n = _n * 2;
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:190:10
|
2022-09-21 18:02:37 +00:00
|
|
|
|
|
|
|
|
LL | _n = _n * &2;
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:191:10
|
2022-09-15 16:28:18 +00:00
|
|
|
|
|
|
|
|
LL | _n = 2 * _n;
|
|
|
|
| ^^^^^^
|
2022-09-13 18:50:24 +00:00
|
|
|
|
2022-09-20 15:06:49 +00:00
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:192:10
|
2022-09-21 18:02:37 +00:00
|
|
|
|
|
|
|
|
LL | _n = &2 * _n;
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:193:10
|
2022-10-03 22:49:03 +00:00
|
|
|
|
|
|
|
|
LL | _n = 23 + &85;
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:194:10
|
2022-10-03 22:49:03 +00:00
|
|
|
|
|
|
|
|
LL | _n = &23 + 85;
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:195:10
|
2022-10-03 22:49:03 +00:00
|
|
|
|
|
|
|
|
LL | _n = &23 + &85;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:198:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom + 0;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:199:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom + 1;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:200:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom + 2;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:201:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom + 0.0;
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:202:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom + 1.0;
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:203:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom + 2.0;
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:204:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom - 0;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:205:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom - 1;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:206:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom - 2;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:207:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom - 0.0;
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:208:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom - 1.0;
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:209:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom - 2.0;
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:210:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom / 0;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:211:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom / 1;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:212:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom / 2;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:213:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom / 0.0;
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:214:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom / 1.0;
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:215:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom / 2.0;
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:216:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom * 0;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:217:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom * 1;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:218:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom * 2;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:219:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom * 0.0;
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:220:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom * 1.0;
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:221:13
|
2022-09-30 18:30:40 +00:00
|
|
|
|
|
|
|
|
LL | let _ = Custom * 2.0;
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:224:10
|
2022-09-20 15:06:49 +00:00
|
|
|
|
|
|
|
|
LL | _n = -_n;
|
|
|
|
| ^^^
|
|
|
|
|
2022-09-21 18:02:37 +00:00
|
|
|
error: arithmetic operation that can potentially result in unexpected side-effects
|
2022-11-19 11:22:27 +00:00
|
|
|
--> $DIR/arithmetic_side_effects.rs:225:10
|
2022-09-21 18:02:37 +00:00
|
|
|
|
|
|
|
|
LL | _n = -&_n;
|
|
|
|
| ^^^^
|
|
|
|
|
2022-10-03 22:49:03 +00:00
|
|
|
error: aborting due to 58 previous errors
|
2022-09-07 13:00:45 +00:00
|
|
|
|