mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 14:38:46 +00:00
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
This commit is contained in:
commit
acc822aa39
1 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue