mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 21:53:23 +00:00
32 lines
1 KiB
Text
32 lines
1 KiB
Text
error: manual implementation of an assign operation
|
|
--> tests/ui/string_add.rs:13:9
|
|
|
|
|
LL | x = x + ".";
|
|
| ^^^^^^^^^^^ help: replace it with: `x += "."`
|
|
|
|
|
= note: `-D clippy::assign-op-pattern` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::assign_op_pattern)]`
|
|
|
|
error: you added something to a string. Consider using `String::push_str()` instead
|
|
--> tests/ui/string_add.rs:13:13
|
|
|
|
|
LL | x = x + ".";
|
|
| ^^^^^^^
|
|
|
|
|
= note: `-D clippy::string-add` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::string_add)]`
|
|
|
|
error: you added something to a string. Consider using `String::push_str()` instead
|
|
--> tests/ui/string_add.rs:17:13
|
|
|
|
|
LL | let z = y + "...";
|
|
| ^^^^^^^^^
|
|
|
|
error: manual implementation of an assign operation
|
|
--> tests/ui/string_add.rs:22:5
|
|
|
|
|
LL | x = x + 1;
|
|
| ^^^^^^^^^ help: replace it with: `x += 1`
|
|
|
|
error: aborting due to 4 previous errors
|
|
|