diff options
| author | alexey semenyuk <alexsemenyuk88@gmail.com> | 2022-06-26 11:14:37 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-26 11:14:37 +0300 |
| commit | 4065702b1fa6f6dc990d8bbe21da1b81885138e4 (patch) | |
| tree | 72c44f7af5d9634f96fefe1ba93ead1db1badd10 /clippy_lints | |
| parent | 8789f4e88a517dc26e8e47c24afbb49b81cd3721 (diff) | |
| download | rust-4065702b1fa6f6dc990d8bbe21da1b81885138e4.tar.gz rust-4065702b1fa6f6dc990d8bbe21da1b81885138e4.zip | |
STRING_ADD example
Diffstat (limited to 'clippy_lints')
| -rw-r--r-- | clippy_lints/src/strings.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clippy_lints/src/strings.rs b/clippy_lints/src/strings.rs index 71f3e6b6a6e..3f9f56c451a 100644 --- a/clippy_lints/src/strings.rs +++ b/clippy_lints/src/strings.rs @@ -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, |
