@@ -68,11 +68,9 @@ pub trait Rng: RngCore {
6868 ///
6969 /// # Arrays and tuples
7070 ///
71- /// The `rng.gen()` method is able to generate arrays (up to 32 elements)
71+ /// The `rng.gen()` method is able to generate arrays
7272 /// and tuples (up to 12 elements), so long as all element types can be
7373 /// generated.
74- /// When using `rustc` ≥ 1.51, enable the `min_const_gen` feature to support
75- /// arrays larger than 32 elements.
7674 ///
7775 /// For arrays of integers, especially for those with small element types
7876 /// (< 64 bit), it will likely be faster to instead use [`Rng::fill`].
@@ -392,8 +390,6 @@ macro_rules! impl_fill {
392390impl_fill ! ( u16 , u32 , u64 , usize , u128 , ) ;
393391impl_fill ! ( i8 , i16 , i32 , i64 , isize , i128 , ) ;
394392
395- #[ cfg_attr( doc_cfg, doc( cfg( feature = "min_const_gen" ) ) ) ]
396- #[ cfg( feature = "min_const_gen" ) ]
397393impl < T , const N : usize > Fill for [ T ; N ]
398394where [ T ] : Fill
399395{
@@ -402,32 +398,6 @@ where [T]: Fill
402398 }
403399}
404400
405- #[ cfg( not( feature = "min_const_gen" ) ) ]
406- macro_rules! impl_fill_arrays {
407- ( $n: expr, ) => { } ;
408- ( $n: expr, $N: ident) => {
409- impl <T > Fill for [ T ; $n] where [ T ] : Fill {
410- fn try_fill<R : Rng + ?Sized >( & mut self , rng: & mut R ) -> Result <( ) , Error > {
411- self [ ..] . try_fill( rng)
412- }
413- }
414- } ;
415- ( $n: expr, $N: ident, $( $NN: ident, ) * ) => {
416- impl_fill_arrays!( $n, $N) ;
417- impl_fill_arrays!( $n - 1 , $( $NN, ) * ) ;
418- } ;
419- ( !div $n: expr, ) => { } ;
420- ( !div $n: expr, $N: ident, $( $NN: ident, ) * ) => {
421- impl_fill_arrays!( $n, $N) ;
422- impl_fill_arrays!( !div $n / 2 , $( $NN, ) * ) ;
423- } ;
424- }
425- #[ cfg( not( feature = "min_const_gen" ) ) ]
426- #[ rustfmt:: skip]
427- impl_fill_arrays ! ( 32 , N , N , N , N , N , N , N , N , N , N , N , N , N , N , N , N , N , N , N , N , N , N , N , N , N , N , N , N , N , N , N , N , N , ) ;
428- #[ cfg( not( feature = "min_const_gen" ) ) ]
429- impl_fill_arrays ! ( !div 4096 , N , N , N , N , N , N , N , ) ;
430-
431401#[ cfg( test) ]
432402mod test {
433403 use super :: * ;
0 commit comments