Skip to content

Commit c9b27d1

Browse files
committed
doc: make BitSet intro more short
Also, add a link to the growable type
1 parent fa0f7d0 commit c9b27d1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/librustc_index/bit_set.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,18 @@ pub type Word = u64;
1313
pub const WORD_BYTES: usize = mem::size_of::<Word>();
1414
pub const WORD_BITS: usize = WORD_BYTES * 8;
1515

16-
/// A fixed-size bitset type with a dense representation. It does not support
17-
/// resizing after creation; use `GrowableBitSet` for that.
16+
/// A fixed-size bitset type with a dense representation.
17+
///
18+
/// NOTE: Use [`GrowableBitSet`] if you need support for resizing after creation.
1819
///
1920
/// `T` is an index type, typically a newtyped `usize` wrapper, but it can also
2021
/// just be `usize`.
2122
///
2223
/// All operations that involve an element will panic if the element is equal
2324
/// to or greater than the domain size. All operations that involve two bitsets
2425
/// will panic if the bitsets have differing domain sizes.
26+
///
27+
/// [`GrowableBitSet`]: struct.GrowableBitSet.html
2528
#[derive(Clone, Eq, PartialEq, RustcDecodable, RustcEncodable)]
2629
pub struct BitSet<T: Idx> {
2730
domain_size: usize,

0 commit comments

Comments
 (0)