7878//! Note that you must use the version of `rand` that `num-bigint` is compatible 
7979//! with: `0.8`. 
8080//! 
81+ //! ### Arbitrary Big Integers 
82+ //! 
83+ //! `num-bigint` supports `arbitrary` and `quickcheck` features to implement 
84+ //! [`arbitrary::Arbitrary`] and [`quickcheck::Arbitrary`], respectively, for both `BigInt` and 
85+ //! `BigUint`. These are useful for fuzzing and other forms of randomized testing. 
86+ //! 
87+ //! ### Serialization 
88+ //! 
89+ //! The `serde` feature adds implementations of [`Serialize`][serde::Serialize] and 
90+ //! [`Deserialize`][serde::Deserialize] for both `BigInt` and `BigUint`. Their serialized data is 
91+ //! generated portably, regardless of platform differences like the internal digit size. 
92+ //! 
8193//! 
8294//! ## Compatibility 
8395//! 
8496//! The `num-bigint` crate is tested for rustc 1.60 and greater. 
8597
98+ #![ cfg_attr( docsrs,  feature( doc_cfg) ) ]  
8699#![ doc( html_root_url = "https://docs.rs/num-bigint/0.4" ) ]  
87100#![ warn( rust_2018_idioms) ]  
88101#![ no_std]  
@@ -99,10 +112,8 @@ use core::fmt;
99112mod  macros; 
100113
101114mod  bigint; 
102- mod  biguint; 
103- 
104- #[ cfg( feature = "rand" ) ]  
105115mod  bigrand; 
116+ mod  biguint; 
106117
107118#[ cfg( target_pointer_width = "32" ) ]  
108119type  UsizePromotion  = u32 ; 
@@ -154,6 +165,7 @@ impl fmt::Display for ParseBigIntError {
154165} 
155166
156167#[ cfg( feature = "std" ) ]  
168+ #[ cfg_attr( docsrs,  doc( cfg( feature = "std" ) ) ) ]  
157169impl  std:: error:: Error  for  ParseBigIntError  { 
158170 fn  description ( & self )  -> & str  { 
159171 self . __description ( ) 
@@ -183,6 +195,7 @@ impl<T> TryFromBigIntError<T> {
183195} 
184196
185197#[ cfg( feature = "std" ) ]  
198+ #[ cfg_attr( docsrs,  doc( cfg( feature = "std" ) ) ) ]  
186199impl < T >  std:: error:: Error  for  TryFromBigIntError < T > 
187200where 
188201 T :  fmt:: Debug , 
@@ -208,6 +221,7 @@ pub use crate::bigint::Sign;
208221pub  use  crate :: bigint:: ToBigInt ; 
209222
210223#[ cfg( feature = "rand" ) ]  
224+ #[ cfg_attr( docsrs,  doc( cfg( feature = "rand" ) ) ) ]  
211225pub  use  crate :: bigrand:: { RandBigInt ,  RandomBits ,  UniformBigInt ,  UniformBigUint } ; 
212226
213227mod  big_digit { 
0 commit comments