]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #3518 - sinkuu:redundant_clone_tw, r=phansch
authorbors <bors@rust-lang.org>
Mon, 10 Dec 2018 18:55:49 +0000 (18:55 +0000)
committerbors <bors@rust-lang.org>
Mon, 10 Dec 2018 18:55:49 +0000 (18:55 +0000)
Lint redundant clone of fields

Makes `redundant_clone` warn on unnecessary `foo.field.clone()` sometimes (it can detect an unnecessary clone only if the base of projection, `foo` in this case, is not used at all after that). This is enough for cases like `returns_tuple().0.clone()`.

1  2 
clippy_lints/src/utils/mod.rs

Simple merge