Commit Graph

5 Commits

Author SHA1 Message Date
Jason Newcomb
8ded385ddc Improve needless_borrow lint.
* Lint when a borrow is auto dereferenced more than once
* Lint when the expression is used as the expression of a block for a match arm

Moves `needless_borrow` and `ref_binding_to_reference` to `dereference`
lint pass in preperation for `explicit_auto_deref` lint.
2021-11-15 13:17:59 -05:00
dswij
81d57de791 Update needless_borrow test output and expected fix 2021-09-13 12:29:24 +08:00
Jason Newcomb
6d4dc35882
Improve needless_borrow lint
Suggest changing usages of ref bindings to match the new type
Split out some cases into new lint `ref_binding_to_reference`
2021-05-20 09:03:47 -04:00
David Tolnay
94154cad20
Downgrade trivially_copy_pass_by_ref to pedantic 2020-04-02 18:56:10 -07:00
Manish Goregaokar
622b167eb8 needless_borrow: allow other lints, make fixable 2019-09-25 14:45:18 -07:00