mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-01 00:49:30 +00:00
STRING_ADD example
This commit is contained in:
parent
8789f4e88a
commit
4065702b1f
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 x = "Hello".to_owned();
|
||||
/// x.push_str(", World");
|
||||
/// ```
|
||||
#[clippy::version = "pre 1.29.0"]
|
||||
pub STRING_ADD,
|
||||
restriction,
|
||||
|
|
Loading…
Reference in a new issue