diff --git a/compiler/rustc_index/src/bit_set.rs b/compiler/rustc_index/src/bit_set.rs index 059755a743b..fb3df9f41ea 100644 --- a/compiler/rustc_index/src/bit_set.rs +++ b/compiler/rustc_index/src/bit_set.rs @@ -340,6 +340,12 @@ impl BitRelations> for BitSet { } } +impl From> for BitSet { + fn from(bit_set: GrowableBitSet) -> Self { + bit_set.bit_set + } +} + /// A fixed-size bitset type with a partially dense, partially sparse /// representation. The bitset is broken into chunks, and chunks that are all /// zeros or all ones are represented and handled very efficiently. @@ -1469,6 +1475,12 @@ impl GrowableBitSet { } } +impl From> for GrowableBitSet { + fn from(bit_set: BitSet) -> Self { + Self { bit_set } + } +} + /// A fixed-size 2D bit matrix type with a dense representation. /// /// `R` and `C` are index types used to identify rows and columns respectively;