Merge pull request #1150 from rodrimati1992/master
Added docs about rand's use of const generics
This commit is contained in:
@@ -128,6 +128,8 @@ Additionally, these features configure Rand:
|
||||
- `nightly` enables some optimizations requiring nightly Rust
|
||||
- `simd_support` (experimental) enables sampling of SIMD values
|
||||
(uniformly random SIMD integers and floats), requiring nightly Rust
|
||||
- `min_const_gen` enables generating random arrays of
|
||||
any size using min-const-generics, requiring Rust ≥ 1.51.
|
||||
|
||||
Note that nightly features are not stable and therefore not all library and
|
||||
compiler versions will be compatible. This is especially true of Rand's
|
||||
|
||||
@@ -186,6 +186,7 @@ tuple_impl! {A, B, C, D, E, F, G, H, I, J}
|
||||
tuple_impl! {A, B, C, D, E, F, G, H, I, J, K}
|
||||
tuple_impl! {A, B, C, D, E, F, G, H, I, J, K, L}
|
||||
|
||||
#[cfg_attr(doc_cfg, doc(cfg(feature = "min_const_gen")))]
|
||||
#[cfg(feature = "min_const_gen")]
|
||||
impl<T, const N: usize> Distribution<[T; N]> for Standard
|
||||
where Standard: Distribution<T>
|
||||
|
||||
@@ -392,6 +392,7 @@ macro_rules! impl_fill {
|
||||
impl_fill!(u16, u32, u64, usize, u128,);
|
||||
impl_fill!(i8, i16, i32, i64, isize, i128,);
|
||||
|
||||
#[cfg_attr(doc_cfg, doc(cfg(feature = "min_const_gen")))]
|
||||
#[cfg(feature = "min_const_gen")]
|
||||
impl<T, const N: usize> Fill for [T; N]
|
||||
where [T]: Fill
|
||||
|
||||
Reference in New Issue
Block a user