File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -454,15 +454,17 @@ mod issue9300 {
454454 }
455455}
456456
457- #[ clippy:: cognitive_complexity = "2 " ]
457+ #[ clippy:: cognitive_complexity = "1 " ]
458458mod issue14422 {
459459 fn foo ( ) {
460+ //~^ cognitive_complexity
460461 for _ in 0 ..10 {
461462 println ! ( "hello there" ) ;
462463 }
463464 }
464465
465466 fn bar ( ) {
467+ //~^ cognitive_complexity
466468 for _ in 0 ..10 {
467469 println ! ( "hello there" ) ;
468470 }
Original file line number Diff line number Diff line change @@ -160,5 +160,21 @@ LL | pub async fn async_method() {
160160 |
161161 = help: you could split it up into multiple smaller functions
162162
163- error: aborting due to 20 previous errors
163+ error: the function has a cognitive complexity of (2/1)
164+ --> tests/ui/cognitive_complexity.rs:459:8
165+ |
166+ LL | fn foo() {
167+ | ^^^
168+ |
169+ = help: you could split it up into multiple smaller functions
170+
171+ error: the function has a cognitive complexity of (2/1)
172+ --> tests/ui/cognitive_complexity.rs:466:8
173+ |
174+ LL | fn bar() {
175+ | ^^^
176+ |
177+ = help: you could split it up into multiple smaller functions
178+
179+ error: aborting due to 22 previous errors
164180
You can’t perform that action at this time.
0 commit comments