Remove ResultsCursor::contains.

It's hardly worth it, and it needs to be removed so that
`GenKillAnalysis` can be removed.
This commit is contained in:
Nicholas Nethercote 2024-10-10 11:21:16 +11:00
parent ea48cf362c
commit 5a8943649a

View File

@ -213,7 +213,7 @@ pub fn bounded_borrowers(
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 {
@ -238,6 +238,6 @@ pub fn bounded_borrowers(
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)
}
}