Extra return statements at end of function should not lower cognitive complexity #14422
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-negative
Issue: The lint should have been triggered on code, but wasn't
Summary
Spamming
return
statements at the end of a function lowers the function's cognitive complexity score, which should not happen.Lint Name
cognitive_complexity
Reproducer
I tried this code:
I expected to see this happen:
foo
andbar
.Instead, this happened:
foo
.Version
The text was updated successfully, but these errors were encountered: