about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-10-10 11:21:16 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-10-14 16:35:28 +1100
commit874b03ec28beba617951efef505fe3e320900454 (patch)
treea2a1cfca2571937411253d923583fc6bdff6ed97 /src
parent5ceb623a4abd66e91e7959d25caaf0523f1a7f7c (diff)
downloadrust-874b03ec28beba617951efef505fe3e320900454.tar.gz
rust-874b03ec28beba617951efef505fe3e320900454.zip
Remove `ResultsCursor::contains`.
It's hardly worth it, and it needs to be removed so that
`GenKillAnalysis` can be removed.
Diffstat (limited to 'src')
-rw-r--r--src/tools/clippy/clippy_utils/src/mir/possible_borrower.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/clippy/clippy_utils/src/mir/possible_borrower.rs b/src/tools/clippy/clippy_utils/src/mir/possible_borrower.rs
index 6bb434a466f..a00196c4b51 100644
--- a/src/tools/clippy/clippy_utils/src/mir/possible_borrower.rs
+++ b/src/tools/clippy/clippy_utils/src/mir/possible_borrower.rs
@@ -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 {
@@ -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)
     }
 }