pub type MaybeUninitializedPlacesDomain = MixedBitSet<MovePathIndex>;
Expand description
There can be many more MovePathIndex
than there are locals in a MIR body.
We use a mixed bitset to avoid paying too high a memory footprint.
Aliased Type§
enum MaybeUninitializedPlacesDomain {
Small(BitSet<MovePathIndex>),
Large(ChunkedBitSet<MovePathIndex>),
}
Variants§
Small(BitSet<MovePathIndex>)
Large(ChunkedBitSet<MovePathIndex>)
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 40 bytes
Size for each variant:
Small
: 32 bytesLarge
: 24 bytes
Implementations
Source§impl<T> MixedBitSet<T>
impl<T> MixedBitSet<T>
pub fn domain_size(&self) -> usize
Source§impl<T> MixedBitSet<T>where
T: Idx,
impl<T> MixedBitSet<T>where
T: Idx,
pub fn new_empty(domain_size: usize) -> MixedBitSet<T>
pub fn is_empty(&self) -> bool
pub fn contains(&self, elem: T) -> bool
pub fn insert(&mut self, elem: T) -> bool
pub fn insert_all(&mut self)
pub fn remove(&mut self, elem: T) -> bool
pub fn iter(&self) -> MixedBitIter<'_, T>
pub fn clear(&mut self)
Sourcepub fn union<Rhs>(&mut self, other: &Rhs) -> boolwhere
MixedBitSet<T>: BitRelations<Rhs>,
pub fn union<Rhs>(&mut self, other: &Rhs) -> boolwhere
MixedBitSet<T>: BitRelations<Rhs>,
Sets self = self | other
and returns true
if self
changed
(i.e., if new bits were added).
Sourcepub fn subtract<Rhs>(&mut self, other: &Rhs) -> boolwhere
MixedBitSet<T>: BitRelations<Rhs>,
pub fn subtract<Rhs>(&mut self, other: &Rhs) -> boolwhere
MixedBitSet<T>: BitRelations<Rhs>,
Sets self = self - other
and returns true
if self
changed.
(i.e., if any bits were removed).
Sourcepub fn intersect<Rhs>(&mut self, other: &Rhs) -> boolwhere
MixedBitSet<T>: BitRelations<Rhs>,
pub fn intersect<Rhs>(&mut self, other: &Rhs) -> boolwhere
MixedBitSet<T>: BitRelations<Rhs>,
Sets self = self & other
and return true
if self
changed.
(i.e., if any bits were removed).
Trait Implementations
Source§impl<T> BitRelations<MixedBitSet<T>> for MixedBitSet<T>where
T: Idx,
impl<T> BitRelations<MixedBitSet<T>> for MixedBitSet<T>where
T: Idx,
fn union(&mut self, other: &MixedBitSet<T>) -> bool
fn subtract(&mut self, other: &MixedBitSet<T>) -> bool
fn intersect(&mut self, _other: &MixedBitSet<T>) -> bool
Source§impl<T> Clone for MixedBitSet<T>
impl<T> Clone for MixedBitSet<T>
Source§fn clone_from(&mut self, from: &MixedBitSet<T>)
fn clone_from(&mut self, from: &MixedBitSet<T>)
WARNING: this implementation of clone_from may panic if the two
bitsets have different domain sizes. This constraint is not inherent to
clone_from
, but it works with the existing call sites and allows a
faster implementation, which is important because this function is hot.
Source§fn clone(&self) -> MixedBitSet<T>
fn clone(&self) -> MixedBitSet<T>
Source§impl<T> Debug for MixedBitSet<T>where
T: Idx,
impl<T> Debug for MixedBitSet<T>where
T: Idx,
Source§impl<T, C> DebugWithContext<C> for MixedBitSet<T>where
T: Idx + DebugWithContext<C>,
impl<T, C> DebugWithContext<C> for MixedBitSet<T>where
T: Idx + DebugWithContext<C>,
Source§impl<T: Idx> GenKill<T> for MixedBitSet<T>
impl<T: Idx> GenKill<T> for MixedBitSet<T>
Source§fn gen_all(&mut self, elems: impl IntoIterator<Item = T>)
fn gen_all(&mut self, elems: impl IntoIterator<Item = T>)
gen
for each element in elems
.Source§fn kill_all(&mut self, elems: impl IntoIterator<Item = T>)
fn kill_all(&mut self, elems: impl IntoIterator<Item = T>)
kill
for each element in elems
.