]> git.lizzy.rs Git - rust.git/commit
Improve `needless_borrow` lint.
authorJason Newcomb <jsnewcomb@pm.me>
Mon, 15 Nov 2021 16:58:25 +0000 (11:58 -0500)
committerJason Newcomb <jsnewcomb@pm.me>
Mon, 15 Nov 2021 18:17:59 +0000 (13:17 -0500)
commit8ded385ddc7e48b4e80633b7b66bb0ea2e56ec38
tree5da3ecc8bc2832aff095adffa0d745531091db9b
parentf51fb341dd3ff79f400ee816dceb81eb2d0c5106
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.
clippy_lints/src/bytecount.rs
clippy_lints/src/dereference.rs
clippy_lints/src/lib.register_all.rs
clippy_lints/src/lib.register_lints.rs
clippy_lints/src/lib.register_pedantic.rs
clippy_lints/src/lib.register_style.rs
clippy_lints/src/lib.rs
clippy_lints/src/needless_borrow.rs [deleted file]
tests/ui/needless_borrow.fixed
tests/ui/needless_borrow.rs
tests/ui/needless_borrow.stderr