about summary refs log tree commit diff
path: root/clippy_lints
diff options
context:
space:
mode:
authoralexey semenyuk <alexsemenyuk88@gmail.com>2022-06-26 11:14:37 +0300
committerGitHub <noreply@github.com>2022-06-26 11:14:37 +0300
commit4065702b1fa6f6dc990d8bbe21da1b81885138e4 (patch)
tree72c44f7af5d9634f96fefe1ba93ead1db1badd10 /clippy_lints
parent8789f4e88a517dc26e8e47c24afbb49b81cd3721 (diff)
downloadrust-4065702b1fa6f6dc990d8bbe21da1b81885138e4.tar.gz
rust-4065702b1fa6f6dc990d8bbe21da1b81885138e4.zip
STRING_ADD example
Diffstat (limited to 'clippy_lints')
-rw-r--r--clippy_lints/src/strings.rs6
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,