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
This commit is contained in:
bors 2020-08-30 20:21:00 +00:00
commit ab64d47c03

View File

@ -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');
/// ```