Skip to content

Commit 9fd378f

Browse files
committed
Give ChunkedBitSet useful Debug impl.
1 parent bfd4061 commit 9fd378f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

compiler/rustc_index/src/bit_set.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ impl<T: Idx> From<GrowableBitSet<T>> for BitSet<T> {
365365
/// All operations that involve an element will panic if the element is equal
366366
/// to or greater than the domain size. All operations that involve two bitsets
367367
/// will panic if the bitsets have differing domain sizes.
368-
#[derive(Debug, PartialEq, Eq)]
368+
#[derive(PartialEq, Eq)]
369369
pub struct ChunkedBitSet<T> {
370370
domain_size: usize,
371371

@@ -1074,6 +1074,12 @@ impl<T: Idx> fmt::Debug for BitSet<T> {
10741074
}
10751075
}
10761076

1077+
impl<T: Idx> fmt::Debug for ChunkedBitSet<T> {
1078+
fn fmt(&self, w: &mut fmt::Formatter<'_>) -> fmt::Result {
1079+
w.debug_list().entries(self.iter()).finish()
1080+
}
1081+
}
1082+
10771083
impl<T: Idx> ToString for BitSet<T> {
10781084
fn to_string(&self) -> String {
10791085
let mut result = String::new();

0 commit comments

Comments
 (0)