diff options
| author | bors <bors@rust-lang.org> | 2020-08-30 20:21:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-08-30 20:21:00 +0000 |
| commit | ab64d47c03c168bf6b2a03851894acf74a5ba117 (patch) | |
| tree | 0b3f8bc531c15c3b02ba8c562196296cebf53af2 | |
| parent | c88c6149415dd47b5f05e69d7307e0a1967c33f2 (diff) | |
| parent | 17b2ba5ded12f59dba63ece659b5cd714b763800 (diff) | |
| download | rust-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:  changelog: none
| -rw-r--r-- | clippy_lints/src/methods/mod.rs | 10 |
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'); /// ``` |
