Skip to content

Commit

Permalink
Remove ResultsCursor::contains.
Browse files Browse the repository at this point in the history
It's hardly worth it, and it needs to be removed so that
`GenKillAnalysis` can be removed.
  • Loading branch information
nnethercote committed Oct 14, 2024
1 parent ea48cf3 commit 5a89436
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clippy_utils/src/mir/possible_borrower.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ impl<'b, 'tcx> PossibleBorrowerMap<'b, 'tcx> {
self.bitset.0.clear();
let maybe_live = &mut self.maybe_live;
if let Some(bitset) = self.map.get(&borrowed) {
for b in bitset.iter().filter(move |b| maybe_live.contains(*b)) {
for b in bitset.iter().filter(move |b| maybe_live.get().contains(*b)) {
self.bitset.0.insert(b);
}
} else {
Expand All @@ -238,6 +238,6 @@ impl<'b, 'tcx> PossibleBorrowerMap<'b, 'tcx> {

pub fn local_is_alive_at(&mut self, local: mir::Local, at: mir::Location) -> bool {
self.maybe_live.seek_after_primary_effect(at);
self.maybe_live.contains(local)
self.maybe_live.get().contains(local)
}
}

0 comments on commit 5a89436

Please sign in to comment.