Commit Graph

21 Commits

Author SHA1 Message Date
Centri3
6702c7a7a6 Add lint [single_range_in_vec_init] 2023-06-12 11:09:52 -05:00
y21
05f78e530a allow the lint in a bunch of tests 2023-06-06 22:56:57 +02:00
Oli Scherer
def1705a27 Update to a compiletest-rs version that requires //@ for commands 2023-04-20 14:44:03 +00:00
Yuri Astrakhan
eb3970285b fallout: fix tests to allow uninlined_format_args
In order to switch `clippy::uninlined_format_args` from pedantic to
style, all existing tests must not raise a warning. I did not want to
change the actual tests, so this is a relatively minor change that:

* add `#![allow(clippy::uninlined_format_args)]` where needed
* normalizes all allow/deny/warn attributes
   * all allow attributes are grouped together
   * sorted alphabetically
   * the `clippy::*` attributes are listed separate from the other ones.
   * deny and warn attributes are listed before the allowed ones

changelog: none
2022-10-02 15:13:22 -04:00
Jason Newcomb
9fa12def3c Improve while_let_on_iterator suggestion inside an FnOnce closure 2022-07-07 22:10:24 -04:00
Elliot Bobrow
430575b61a add manual_find lint for function return case 2022-05-16 20:20:49 -07:00
Jason Newcomb
ff58efb2b2 Better detect when a field can be moved from in while_let_on_iterator 2022-01-03 23:13:31 -05:00
hkalbasi
388a3d0983 Implement equatable if let lint 2021-10-04 22:16:42 +03:30
Jason Newcomb
205aa88921
Fix while_let_on_iterator
When the iterator is one field within a local correctly check for usages of the field
2021-07-31 09:32:54 -04:00
Jason Newcomb
fe75faa6ee
Fix while_let_on_iterator
Reborrow mutable references rather then take a reference to them.
2021-07-31 00:11:46 -04:00
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