Auto merge of #6390 - pro-grammer1:master, r=ebroto

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
This commit is contained in:
bors 2020-11-28 21:37:05 +00:00
commit e42ba4829c

View File

@ -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