Skip to content

Commit 6b762ee

Browse files
committed
Auto merge of #9054 - alex-semenyuk:string_add_example, r=giraffate
STRING_ADD example changelog: none STRING_ADD example, how it should be
2 parents 57e7e1d + 1691914 commit 6b762ee

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

clippy_lints/src/strings.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ declare_clippy_lint! {
6060
/// let x = "Hello".to_owned();
6161
/// x + ", World";
6262
/// ```
63+
///
64+
/// Use instead:
65+
/// ```rust
66+
/// let mut x = "Hello".to_owned();
67+
/// x.push_str(", World");
68+
/// ```
6369
#[clippy::version = "pre 1.29.0"]
6470
pub STRING_ADD,
6571
restriction,

0 commit comments

Comments
 (0)