cognitive_complexity
lint includes code expanded from macro in calculated complexity
#14417
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
Code expanded from macros should not count towards cognitive complexity. Instead, a macro call should have the same cognitive complexity as a function call.
Lint Name
cognitive_complexity
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
Lint does not trigger.
Version
Additional Labels
@rustbot label +L-nursery
The text was updated successfully, but these errors were encountered: