Skip to content

Commit

Permalink
Auto merge of #6390 - pro-grammer1:master, r=ebroto
Browse files Browse the repository at this point in the history
Added known problem to comparison_chain docs

changelog: Added documentation to comparison_chain that explains a possible performance penalty, according to issue #5354

This is my first PR, I hope everything has been done correctly.

Fixes #5354
  • Loading branch information
bors committed Nov 28, 2020
2 parents d75bc86 + cb6a654 commit e42ba48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clippy_lints/src/comparison_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ declare_clippy_lint! {
/// **Why is this bad?** `if` is not guaranteed to be exhaustive and conditionals can get
/// repetitive
///
/// **Known problems:** None.
/// **Known problems:** The match statement may be slower due to the compiler
/// not inlining the call to cmp. See issue #5354
///
/// **Example:**
/// ```rust,ignore
Expand Down

0 comments on commit e42ba48

Please sign in to comment.