diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-11-22 14:39:29 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-11-22 17:02:04 +1100 |
| commit | ae9ac0e383b8054ccded79ce26e48a14b485cb3c (patch) | |
| tree | b423936325cc68c32d7b005c62a50a61b51f6157 /compiler/rustc_mir_dataflow/src/framework/mod.rs | |
| parent | a1f299953656f95004c69b24ad8071d6899fa9da (diff) | |
| download | rust-ae9ac0e383b8054ccded79ce26e48a14b485cb3c.tar.gz rust-ae9ac0e383b8054ccded79ce26e48a14b485cb3c.zip | |
Remove the `DefinitelyInitializedPlaces` analysis.
Its only use is in the `tests/ui/mir-dataflow/def_inits-1.rs` where it is tested via `rustc_peek_definite_init`. Also, it's probably buggy. It's supposed to be the inverse of `MaybeUninitializedPlaces`, and it mostly is, except that `apply_terminator_effect` is a little different, and `apply_switch_int_edge_effects` is missing. Unlike `MaybeUninitializedPlaces`, which is used extensively in borrow checking, any bugs in `DefinitelyInitializedPlaces` are easy to overlook because it is only used in one small test. This commit removes the analysis. It also removes `rustc_peek_definite_init`, `Dual` and `MeetSemiLattice`, all of which are no longer needed.
Diffstat (limited to 'compiler/rustc_mir_dataflow/src/framework/mod.rs')
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/framework/mod.rs | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/compiler/rustc_mir_dataflow/src/framework/mod.rs b/compiler/rustc_mir_dataflow/src/framework/mod.rs index 244dfe26ad3..359d9280c52 100644 --- a/compiler/rustc_mir_dataflow/src/framework/mod.rs +++ b/compiler/rustc_mir_dataflow/src/framework/mod.rs @@ -378,16 +378,6 @@ impl<T, S: GenKill<T>> GenKill<T> for MaybeReachable<S> { } } -impl<T: Idx> GenKill<T> for lattice::Dual<BitSet<T>> { - fn gen_(&mut self, elem: T) { - self.0.insert(elem); - } - - fn kill(&mut self, elem: T) { - self.0.remove(elem); - } -} - // NOTE: DO NOT CHANGE VARIANT ORDER. The derived `Ord` impls rely on the current order. #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)] enum Effect { |
