Skip to content

Commit

Permalink
Auto merge of rust-lang#5988 - camelid:patch-2, r=ebroto
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Aug 30, 2020
2 parents c88c614 + 17b2ba5 commit ab64d47
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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');
/// ```
Expand Down

0 comments on commit ab64d47

Please sign in to comment.