diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:57:31 +0000 |
commit | dc0db358abe19481e475e10c32149b53370f1a1c (patch) | |
tree | ab8ce99c4b255ce46f99ef402c27916055b899ee /vendor/proptest/src/bits.rs | |
parent | Releasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff) | |
download | rustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip |
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/proptest/src/bits.rs')
-rw-r--r-- | vendor/proptest/src/bits.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/vendor/proptest/src/bits.rs b/vendor/proptest/src/bits.rs index 49de83085..342eb28b1 100644 --- a/vendor/proptest/src/bits.rs +++ b/vendor/proptest/src/bits.rs @@ -95,6 +95,7 @@ int_bitset!(i64); int_bitset!(isize); #[cfg(feature = "bit-set")] +#[cfg_attr(docsrs, doc(cfg(feature = "bit-set")))] impl BitSetLike for BitSet { fn new_bitset(max: usize) -> Self { BitSet::with_capacity(max) @@ -430,6 +431,7 @@ macro_rules! minimal_api { minimal_api!(usize, usize); minimal_api!(isize, isize); #[cfg(feature = "bit-set")] +#[cfg_attr(docsrs, doc(cfg(feature = "bit-set")))] minimal_api!(bitset, BitSet); minimal_api!(bool_vec, Vec<bool>); @@ -442,11 +444,13 @@ pub(crate) mod varsize { #[cfg(not(feature = "bit-set"))] type Inner = Vec<bool>; + /// A bit set is a set of bit flags. #[derive(Debug, Clone)] - pub(crate) struct VarBitSet(Inner); + pub struct VarBitSet(Inner); impl VarBitSet { - pub(crate) fn saturated(len: usize) -> Self { + /// Create a bit set of `len` set values. + pub fn saturated(len: usize) -> Self { (0..len).collect::<VarBitSet>() } @@ -515,7 +519,7 @@ pub(crate) mod varsize { } } -pub(crate) use self::varsize::VarBitSet; +pub use self::varsize::VarBitSet; #[cfg(test)] mod test { |