]> git.lizzy.rs Git - rust.git/commit
Exclude pattern guards from unnecessary_fold lint
authorJoshua Holmer <jholmer@dminc.com>
Fri, 12 Oct 2018 14:26:55 +0000 (10:26 -0400)
committerJoshua Holmer <jholmer@dminc.com>
Fri, 12 Oct 2018 16:11:56 +0000 (12:11 -0400)
commitd3c06f7252fdca30b19aa6ff8ecf63c86675676e
treebcb879456bc372fe187052e580bb7e30b5702ec4
parentd445dbfe162212f90efbe2df9795a257a347a767
Exclude pattern guards from unnecessary_fold lint

Methods like `Iterator::any` borrow the iterator mutably,
which is not allowed within a pattern guard and will fail to compile.
This commit prevents clippy from suggesting this type of change.

Closes #3069
clippy_lints/src/methods/mod.rs
tests/ui/unnecessary_fold.rs