about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-08-30 20:21:00 +0000
committerbors <bors@rust-lang.org>2020-08-30 20:21:00 +0000
commitab64d47c03c168bf6b2a03851894acf74a5ba117 (patch)
tree0b3f8bc531c15c3b02ba8c562196296cebf53af2
parentc88c6149415dd47b5f05e69d7307e0a1967c33f2 (diff)
parent17b2ba5ded12f59dba63ece659b5cd714b763800 (diff)
downloadrust-ab64d47c03c168bf6b2a03851894acf74a5ba117.tar.gz
rust-ab64d47c03c168bf6b2a03851894acf74a5ba117.zip
Auto merge of #5988 - camelid:patch-2, r=ebroto
Syntax-highlight `single_char_push_str` lint

It wasn't being syntax highlighted in the online lint index:

![image](https://user-images.githubusercontent.com/37223377/91666682-8fc02000-eab3-11ea-95fa-6671472712c8.png)

changelog: none
-rw-r--r--clippy_lints/src/methods/mod.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs
index 9996df69470..7c4a78cbdcd 100644
--- a/clippy_lints/src/methods/mod.rs
+++ b/clippy_lints/src/methods/mod.rs
@@ -1324,20 +1324,20 @@ declare_clippy_lint! {
 }
 
 declare_clippy_lint! {
-    /// **What it does:** Warns when using push_str with a single-character string literal,
-    /// and push with a char would work fine.
+    /// **What it does:** Warns when using `push_str` with a single-character string literal,
+    /// and `push` with a `char` would work fine.
     ///
-    /// **Why is this bad?** It's less clear that we are pushing a single character
+    /// **Why is this bad?** It's less clear that we are pushing a single character.
     ///
     /// **Known problems:** None
     ///
     /// **Example:**
-    /// ```
+    /// ```rust
     /// let mut string = String::new();
     /// string.push_str("R");
     /// ```
     /// Could be written as
-    /// ```
+    /// ```rust
     /// let mut string = String::new();
     /// string.push('R');
     /// ```