mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-14 17:48:10 +00:00
20 lines
622 B
Plaintext
20 lines
622 B
Plaintext
error: `format!(..)` appended to existing `String`
|
|
--> $DIR/format_push_string.rs:5:5
|
|
|
|
|
LL | string += &format!("{:?}", 1234);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::format-push-string` implied by `-D warnings`
|
|
= help: consider using `write!` to avoid the extra allocation
|
|
|
|
error: `format!(..)` appended to existing `String`
|
|
--> $DIR/format_push_string.rs:6:5
|
|
|
|
|
LL | string.push_str(&format!("{:?}", 5678));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider using `write!` to avoid the extra allocation
|
|
|
|
error: aborting due to 2 previous errors
|
|
|