mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 13:13:34 +00:00
67aad6c180
This moves the `string_lit_as_bytes` tests into a new file and enables rustfix tests for them.
56 lines
1.6 KiB
Text
56 lines
1.6 KiB
Text
error: manual implementation of an assign operation
|
|
--> $DIR/strings.rs:8:9
|
|
|
|
|
LL | x = x + ".";
|
|
| ^^^^^^^^^^^ help: replace it with: `x += "."`
|
|
|
|
|
= note: `-D clippy::assign-op-pattern` implied by `-D warnings`
|
|
|
|
error: you added something to a string. Consider using `String::push_str()` instead
|
|
--> $DIR/strings.rs:8:13
|
|
|
|
|
LL | x = x + ".";
|
|
| ^^^^^^^
|
|
|
|
|
= note: `-D clippy::string-add` implied by `-D warnings`
|
|
|
|
error: you added something to a string. Consider using `String::push_str()` instead
|
|
--> $DIR/strings.rs:12:13
|
|
|
|
|
LL | let z = y + "...";
|
|
| ^^^^^^^^^
|
|
|
|
error: you assigned the result of adding something to this string. Consider using `String::push_str()` instead
|
|
--> $DIR/strings.rs:22:9
|
|
|
|
|
LL | x = x + ".";
|
|
| ^^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::string-add-assign` implied by `-D warnings`
|
|
|
|
error: manual implementation of an assign operation
|
|
--> $DIR/strings.rs:22:9
|
|
|
|
|
LL | x = x + ".";
|
|
| ^^^^^^^^^^^ help: replace it with: `x += "."`
|
|
|
|
error: you assigned the result of adding something to this string. Consider using `String::push_str()` instead
|
|
--> $DIR/strings.rs:36:9
|
|
|
|
|
LL | x = x + ".";
|
|
| ^^^^^^^^^^^
|
|
|
|
error: manual implementation of an assign operation
|
|
--> $DIR/strings.rs:36:9
|
|
|
|
|
LL | x = x + ".";
|
|
| ^^^^^^^^^^^ help: replace it with: `x += "."`
|
|
|
|
error: you added something to a string. Consider using `String::push_str()` instead
|
|
--> $DIR/strings.rs:40:13
|
|
|
|
|
LL | let z = y + "...";
|
|
| ^^^^^^^^^
|
|
|
|
error: aborting due to 8 previous errors
|
|
|