mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-30 06:53:27 +00:00
61 lines
1.8 KiB
Text
61 lines
1.8 KiB
Text
error: you added something to a string. Consider using `String::push_str()` instead
|
|
--> strings.rs:10:13
|
|
|
|
|
10 | x = x + ".";
|
|
| ^^^^^^^
|
|
|
|
|
= note: `-D string-add` implied by `-D warnings`
|
|
|
|
error: you added something to a string. Consider using `String::push_str()` instead
|
|
--> strings.rs:14:13
|
|
|
|
|
14 | let z = y + "...";
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: `-D string-add` implied by `-D warnings`
|
|
|
|
error: you assigned the result of adding something to this string. Consider using `String::push_str()` instead
|
|
--> strings.rs:24:9
|
|
|
|
|
24 | x = x + ".";
|
|
| ^^^^^^^^^^^
|
|
|
|
|
= note: `-D string-add-assign` implied by `-D warnings`
|
|
|
|
error: you assigned the result of adding something to this string. Consider using `String::push_str()` instead
|
|
--> strings.rs:38:9
|
|
|
|
|
38 | x = x + ".";
|
|
| ^^^^^^^^^^^
|
|
|
|
|
= note: `-D string-add-assign` implied by `-D warnings`
|
|
|
|
error: you added something to a string. Consider using `String::push_str()` instead
|
|
--> strings.rs:42:13
|
|
|
|
|
42 | let z = y + "...";
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: `-D string-add` implied by `-D warnings`
|
|
|
|
error: calling `as_bytes()` on a string literal
|
|
--> strings.rs:50:14
|
|
|
|
|
50 | let bs = "hello there".as_bytes();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using a byte string literal instead `b"hello there"`
|
|
|
|
|
= note: `-D string-lit-as-bytes` implied by `-D warnings`
|
|
|
|
error: manual implementation of an assign operation
|
|
--> strings.rs:65:7
|
|
|
|
|
65 | ; x = x + 1;
|
|
| ^^^^^^^^^ help: replace it with `x += 1`
|
|
|
|
|
= note: `-D assign-op-pattern` implied by `-D warnings`
|
|
|
|
error: aborting due to 7 previous errors
|
|
|
|
error: Could not compile `clippy_tests`.
|
|
|
|
To learn more, run the command again with --verbose.
|