Commit graph

11 commits

Author SHA1 Message Date
Jason Newcomb
7db0e4f791
Suggest &mut iter inside a closure for while_let_on_iterator 2021-05-21 12:27:40 -04:00
Jason Newcomb
cd0db8a459
Fix test comment for while_let_on_iterator 2021-05-12 21:51:23 -04:00
Jason Newcomb
4713e25ab0
Cleanup of while_let_on_iterator 2021-05-12 21:51:19 -04:00
Jason Newcomb
daca50a515
Improvements to while_let_on_iterator
* Suggest `&mut iter` when the iterator is used after the loop.
* Suggest `&mut iter` when the iterator is a field in a struct.
* Don't lint when the iterator is a field in a struct, and the struct is
used in the loop.
* Lint when the loop is nested in another loop, but suggest `&mut iter`
unless the iterator is from a local declared inside the loop.
2021-05-12 21:49:22 -04:00
mark
d2f0b27f0a clippy: stabilize or_patterns lint 2021-03-19 19:45:42 -05:00
flip1995
d13d8987b0 Merge commit '43a1777b89cf6791f9e20878b4e5e3ae907867a5' into clippyup 2020-05-11 20:23:47 +02:00
flip1995
a1826222cf
Add tests for #1654 2020-04-25 20:51:23 +02:00
flip1995
44511d5ee6
Update while_let_on_iterator tests 2020-04-25 20:11:15 +02:00
David Tolnay
899a1b5598
Move cognitive_complexity to nursery 2020-04-08 08:37:20 -07:00
Michael Wright
dcfe380de4 Remove unused attrs in while_let_on_iterator tests 2019-05-09 05:58:54 +02:00
Michael Wright
5149ed40a9 Rename while_loop tests to while_let_on_iterator 2019-05-08 09:30:17 +02:00
Renamed from tests/ui/while_loop.rs (Browse further)