diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-10-10 11:21:16 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-10-14 16:35:28 +1100 |
| commit | 874b03ec28beba617951efef505fe3e320900454 (patch) | |
| tree | a2a1cfca2571937411253d923583fc6bdff6ed97 /compiler/rustc_mir_transform/src | |
| parent | 5ceb623a4abd66e91e7959d25caaf0523f1a7f7c (diff) | |
Remove `ResultsCursor::contains`.
It's hardly worth it, and it needs to be removed so that `GenKillAnalysis` can be removed.
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/elaborate_drops.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/ref_prop.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir_transform/src/elaborate_drops.rs b/compiler/rustc_mir_transform/src/elaborate_drops.rs index c35aec42408..f4ac4d9fee6 100644 --- a/compiler/rustc_mir_transform/src/elaborate_drops.rs +++ b/compiler/rustc_mir_transform/src/elaborate_drops.rs @@ -133,7 +133,7 @@ impl InitializationData<'_, '_> { } fn maybe_live_dead(&self, path: MovePathIndex) -> (bool, bool) { - (self.inits.contains(path), self.uninits.contains(path)) + (self.inits.get().contains(path), self.uninits.get().contains(path)) } } diff --git a/compiler/rustc_mir_transform/src/ref_prop.rs b/compiler/rustc_mir_transform/src/ref_prop.rs index a62a892716f..53e53d9d5ba 100644 --- a/compiler/rustc_mir_transform/src/ref_prop.rs +++ b/compiler/rustc_mir_transform/src/ref_prop.rs @@ -179,7 +179,7 @@ fn compute_replacement<'tcx>( } else { // This is a proper dereference. We can only allow it if `target` is live. maybe_dead.seek_after_primary_effect(loc); - let maybe_dead = maybe_dead.contains(target.local); + let maybe_dead = maybe_dead.get().contains(target.local); !maybe_dead } }; |
