about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-05-17 12:01:12 +0000
committerbors <bors@rust-lang.org>2022-05-17 12:01:12 +0000
commitacc822aa39040ffbb444f17c11ea698c7ed0c334 (patch)
tree5f2d5972aa961b37d3d21e4280f7e2bcf16d04f0
parente9f3cdf84ea5b54add2037e57006b817f879befe (diff)
parentae9d727b8db5bc8c9e052f4dd43f606039d22738 (diff)
downloadrust-acc822aa39040ffbb444f17c11ea698c7ed0c334.tar.gz
rust-acc822aa39040ffbb444f17c11ea698c7ed0c334.zip
Auto merge of #97111 - JohnTitor:rollup-x3vjf6u, r=JohnTitor
Rollup of 7 pull requests

Successful merges:

 - #96329 (Add a couple tests for #90887 fixes)
 - #97009 (Allow `unused_macro_rules` in path tests)
 - #97075 (Add regression test for #81804)
 - #97079 (Change `Successors` to `impl Iterator<Item = BasicBlock>`)
 - #97080 (remove the `RelateResultCompare` trait)
 - #97093 (Migrate `maybe_recover_from_bad_type_plus` diagnostic)
 - #97102 (Update function pointer call error message)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
-rw-r--r--clippy_lints/src/redundant_clone.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/redundant_clone.rs b/clippy_lints/src/redundant_clone.rs
index 1507c75ff61..37aac8b2a49 100644
--- a/clippy_lints/src/redundant_clone.rs
+++ b/clippy_lints/src/redundant_clone.rs
@@ -114,7 +114,7 @@ impl<'tcx> LateLintPass<'tcx> for RedundantClone {
             }
 
             // Give up on loops
-            if terminator.successors().any(|s| *s == bb) {
+            if terminator.successors().any(|s| s == bb) {
                 continue;
             }
 
@@ -440,7 +440,7 @@ fn visit_clone_usage(cloned: mir::Local, clone: mir::Local, mir: &mir::Body<'_>,
             // Short-circuit
             if (usage.cloned_used && usage.clone_consumed_or_mutated) ||
                 // Give up on loops
-                tdata.terminator().successors().any(|s| *s == bb)
+                tdata.terminator().successors().any(|s| s == bb)
             {
                 return CloneUsage {
                     cloned_used: true,