Skip to content

Commit ab64d47

Browse files
committed
Auto merge of rust-lang#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
2 parents c88c614 + 17b2ba5 commit ab64d47

File tree

1 file changed

+5
-5
lines changed
  • clippy_lints/src/methods

1 file changed

+5
-5
lines changed

clippy_lints/src/methods/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,20 +1324,20 @@ declare_clippy_lint! {
13241324
}
13251325

13261326
declare_clippy_lint! {
1327-
/// **What it does:** Warns when using push_str with a single-character string literal,
1328-
/// and push with a char would work fine.
1327+
/// **What it does:** Warns when using `push_str` with a single-character string literal,
1328+
/// and `push` with a `char` would work fine.
13291329
///
1330-
/// **Why is this bad?** It's less clear that we are pushing a single character
1330+
/// **Why is this bad?** It's less clear that we are pushing a single character.
13311331
///
13321332
/// **Known problems:** None
13331333
///
13341334
/// **Example:**
1335-
/// ```
1335+
/// ```rust
13361336
/// let mut string = String::new();
13371337
/// string.push_str("R");
13381338
/// ```
13391339
/// Could be written as
1340-
/// ```
1340+
/// ```rust
13411341
/// let mut string = String::new();
13421342
/// string.push('R');
13431343
/// ```

0 commit comments

Comments
 (0)