@@ -31,14 +31,12 @@ pub use iter::IntoIter;
3131/// # Example
3232///
3333/// ```rust
34- /// #![feature(array_from_fn)]
35- ///
3634/// let array = core::array::from_fn(|i| i);
3735/// assert_eq!(array, [0, 1, 2, 3, 4]);
3836/// ```
3937#[ inline]
40- #[ unstable ( feature = "array_from_fn" , issue = "89379 " ) ]
41- pub fn from_fn < F , T , const N : usize > ( mut cb : F ) -> [ T ; N ]
38+ #[ stable ( feature = "array_from_fn" , since = "1.63.0 " ) ]
39+ pub fn from_fn < T , const N : usize , F > ( mut cb : F ) -> [ T ; N ]
4240where
4341 F : FnMut ( usize ) -> T ,
4442{
6563/// # Example
6664///
6765/// ```rust
68- /// #![feature(array_from_fn )]
66+ /// #![feature(array_try_from_fn )]
6967///
7068/// let array: Result<[u8; 5], _> = std::array::try_from_fn(|i| i.try_into());
7169/// assert_eq!(array, Ok([0, 1, 2, 3, 4]));
8078/// assert_eq!(array, None);
8179/// ```
8280#[ inline]
83- #[ unstable( feature = "array_from_fn " , issue = "89379" ) ]
84- pub fn try_from_fn < F , R , const N : usize > ( cb : F ) -> ChangeOutputType < R , [ R :: Output ; N ] >
81+ #[ unstable( feature = "array_try_from_fn " , issue = "89379" ) ]
82+ pub fn try_from_fn < R , const N : usize , F > ( cb : F ) -> ChangeOutputType < R , [ R :: Output ; N ] >
8583where
8684 F : FnMut ( usize ) -> R ,
8785 R : Try ,
0 commit comments