mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 13:43:17 +00:00
Auto merge of #9054 - alex-semenyuk:string_add_example, r=giraffate
STRING_ADD example changelog: none STRING_ADD example, how it should be
This commit is contained in:
commit
6b762ee330
1 changed files with 6 additions and 0 deletions
|
@ -60,6 +60,12 @@ declare_clippy_lint! {
|
|||
/// let x = "Hello".to_owned();
|
||||
/// x + ", World";
|
||||
/// ```
|
||||
///
|
||||
/// Use instead:
|
||||
/// ```rust
|
||||
/// let mut x = "Hello".to_owned();
|
||||
/// x.push_str(", World");
|
||||
/// ```
|
||||
#[clippy::version = "pre 1.29.0"]
|
||||
pub STRING_ADD,
|
||||
restriction,
|
||||
|
|
Loading…
Reference in a new issue