Skip to content

Commit

Permalink
Auto merge of rust-lang#97111 - JohnTitor:rollup-x3vjf6u, r=JohnTitor
Browse files Browse the repository at this point in the history
Rollup of 7 pull requests

Successful merges:

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

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed May 17, 2022
2 parents e9f3cdf + ae9d727 commit acc822a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/redundant_clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit acc822a

Please sign in to comment.