Skip to content

Commit 5a89436

Browse files
committed
Remove ResultsCursor::contains.
It's hardly worth it, and it needs to be removed so that `GenKillAnalysis` can be removed.
1 parent ea48cf3 commit 5a89436

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_utils/src/mir/possible_borrower.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ impl<'b, 'tcx> PossibleBorrowerMap<'b, 'tcx> {
213213
self.bitset.0.clear();
214214
let maybe_live = &mut self.maybe_live;
215215
if let Some(bitset) = self.map.get(&borrowed) {
216-
for b in bitset.iter().filter(move |b| maybe_live.contains(*b)) {
216+
for b in bitset.iter().filter(move |b| maybe_live.get().contains(*b)) {
217217
self.bitset.0.insert(b);
218218
}
219219
} else {
@@ -238,6 +238,6 @@ impl<'b, 'tcx> PossibleBorrowerMap<'b, 'tcx> {
238238

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

0 commit comments

Comments
 (0)