44//!
55//! *[See also the array primitive type](../../std/primitive.array.html).*
66
7- #![ unstable( feature = "fixed_size_array" ,
8- reason = "traits and impls are better expressed through generic \
9- integer constants",
10- issue = "27778" ) ]
7+ #![ stable( feature = "core_array" , since = "1.36.0" ) ]
118
129use crate :: borrow:: { Borrow , BorrowMut } ;
1310use crate :: cmp:: Ordering ;
@@ -30,13 +27,17 @@ use crate::slice::{Iter, IterMut};
3027/// Note that the traits AsRef and AsMut provide similar methods for types that
3128/// may not be fixed-size arrays. Implementors should prefer those traits
3229/// instead.
30+ #[ unstable( feature = "fixed_size_array" , issue = "27778" ) ]
3331pub unsafe trait FixedSizeArray < T > {
3432 /// Converts the array to immutable slice
33+ #[ unstable( feature = "fixed_size_array" , issue = "27778" ) ]
3534 fn as_slice ( & self ) -> & [ T ] ;
3635 /// Converts the array to mutable slice
36+ #[ unstable( feature = "fixed_size_array" , issue = "27778" ) ]
3737 fn as_mut_slice ( & mut self ) -> & mut [ T ] ;
3838}
3939
40+ #[ unstable( feature = "fixed_size_array" , issue = "27778" ) ]
4041unsafe impl < T , A : Unsize < [ T ] > > FixedSizeArray < T > for A {
4142 #[ inline]
4243 fn as_slice ( & self ) -> & [ T ] {
@@ -53,6 +54,7 @@ unsafe impl<T, A: Unsize<[T]>> FixedSizeArray<T> for A {
5354#[ derive( Debug , Copy , Clone ) ]
5455pub struct TryFromSliceError ( ( ) ) ;
5556
57+ #[ stable( feature = "core_array" , since = "1.36.0" ) ]
5658impl fmt:: Display for TryFromSliceError {
5759 #[ inline]
5860 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
0 commit comments