Skip to content

Commit acc822a

Browse files
committed
Auto merge of rust-lang#97111 - JohnTitor:rollup-x3vjf6u, r=JohnTitor
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
2 parents e9f3cdf + ae9d727 commit acc822a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/redundant_clone.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ impl<'tcx> LateLintPass<'tcx> for RedundantClone {
114114
}
115115

116116
// Give up on loops
117-
if terminator.successors().any(|s| *s == bb) {
117+
if terminator.successors().any(|s| s == bb) {
118118
continue;
119119
}
120120

@@ -440,7 +440,7 @@ fn visit_clone_usage(cloned: mir::Local, clone: mir::Local, mir: &mir::Body<'_>,
440440
// Short-circuit
441441
if (usage.cloned_used && usage.clone_consumed_or_mutated) ||
442442
// Give up on loops
443-
tdata.terminator().successors().any(|s| *s == bb)
443+
tdata.terminator().successors().any(|s| s == bb)
444444
{
445445
return CloneUsage {
446446
cloned_used: true,

0 commit comments

Comments
 (0)