about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTshepang Lekhonkhobe <tshepang@gmail.com>2019-10-18 01:16:30 +0200
committerTshepang Lekhonkhobe <tshepang@gmail.com>2019-10-18 01:16:30 +0200
commitc9b27d1236d68f9f5c86ca4db015ddeca6a1e39a (patch)
tree8d0c546bff9814c255907831664704f18a650e02
parentfa0f7d0080d8e7e9eb20aa9cbf8013f96c81287f (diff)
downloadrust-c9b27d1236d68f9f5c86ca4db015ddeca6a1e39a.tar.gz
rust-c9b27d1236d68f9f5c86ca4db015ddeca6a1e39a.zip
doc: make BitSet intro more short
Also, add a link to the growable type
-rw-r--r--src/librustc_index/bit_set.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/librustc_index/bit_set.rs b/src/librustc_index/bit_set.rs
index d8c6e4c33e2..9ed5ef5a539 100644
--- a/src/librustc_index/bit_set.rs
+++ b/src/librustc_index/bit_set.rs
@@ -13,8 +13,9 @@ pub type Word = u64;
 pub const WORD_BYTES: usize = mem::size_of::<Word>();
 pub const WORD_BITS: usize = WORD_BYTES * 8;
 
-/// A fixed-size bitset type with a dense representation. It does not support
-/// resizing after creation; use `GrowableBitSet` for that.
+/// A fixed-size bitset type with a dense representation.
+///
+/// NOTE: Use [`GrowableBitSet`] if you need support for resizing after creation.
 ///
 /// `T` is an index type, typically a newtyped `usize` wrapper, but it can also
 /// just be `usize`.
@@ -22,6 +23,8 @@ pub const WORD_BITS: usize = WORD_BYTES * 8;
 /// All operations that involve an element will panic if the element is equal
 /// to or greater than the domain size. All operations that involve two bitsets
 /// will panic if the bitsets have differing domain sizes.
+///
+/// [`GrowableBitSet`]: struct.GrowableBitSet.html
 #[derive(Clone, Eq, PartialEq, RustcDecodable, RustcEncodable)]
 pub struct BitSet<T: Idx> {
     domain_size: usize,