rust/tests/ui/string_add_assign.stderr

25 lines
735 B
Plaintext
Raw Normal View History

error: you assigned the result of adding something to this string. Consider using `String::push_str()` instead
2023-07-27 06:40:22 -05:00
--> $DIR/string_add_assign.rs:8:9
|
LL | x = x + ".";
| ^^^^^^^^^^^
|
= note: `-D clippy::string-add-assign` implied by `-D warnings`
error: manual implementation of an assign operation
2023-07-27 06:40:22 -05:00
--> $DIR/string_add_assign.rs:8:9
|
LL | x = x + ".";
| ^^^^^^^^^^^ help: replace it with: `x += "."`
|
= note: `-D clippy::assign-op-pattern` implied by `-D warnings`
error: manual implementation of an assign operation
2023-07-27 06:40:22 -05:00
--> $DIR/string_add_assign.rs:17:5
|
LL | x = x + 1;
| ^^^^^^^^^ help: replace it with: `x += 1`
error: aborting due to 3 previous errors