@@ -713,8 +713,6 @@ impl<T> [T] {
713
713
/// # Examples
714
714
///
715
715
/// ```
716
- /// #![feature(chunks_exact)]
717
- ///
718
716
/// let slice = ['l', 'o', 'r', 'e', 'm'];
719
717
/// let mut iter = slice.chunks_exact(2);
720
718
/// assert_eq!(iter.next().unwrap(), &['l', 'o']);
@@ -725,7 +723,7 @@ impl<T> [T] {
725
723
///
726
724
/// [`chunks`]: #method.chunks
727
725
/// [`rchunks_exact`]: #method.rchunks_exact
728
- #[ unstable ( feature = "chunks_exact" , issue = "47115 " ) ]
726
+ #[ stable ( feature = "chunks_exact" , since = "1.31.0 " ) ]
729
727
#[ inline]
730
728
pub fn chunks_exact ( & self , chunk_size : usize ) -> ChunksExact < T > {
731
729
assert ! ( chunk_size != 0 ) ;
@@ -756,8 +754,6 @@ impl<T> [T] {
756
754
/// # Examples
757
755
///
758
756
/// ```
759
- /// #![feature(chunks_exact)]
760
- ///
761
757
/// let v = &mut [0, 0, 0, 0, 0];
762
758
/// let mut count = 1;
763
759
///
@@ -772,7 +768,7 @@ impl<T> [T] {
772
768
///
773
769
/// [`chunks_mut`]: #method.chunks_mut
774
770
/// [`rchunks_exact_mut`]: #method.rchunks_exact_mut
775
- #[ unstable ( feature = "chunks_exact" , issue = "47115 " ) ]
771
+ #[ stable ( feature = "chunks_exact" , since = "1.31.0 " ) ]
776
772
#[ inline]
777
773
pub fn chunks_exact_mut ( & mut self , chunk_size : usize ) -> ChunksExactMut < T > {
778
774
assert ! ( chunk_size != 0 ) ;
@@ -4022,25 +4018,25 @@ unsafe impl<'a, T> TrustedRandomAccess for ChunksMut<'a, T> {
4022
4018
/// [`remainder`]: ../../std/slice/struct.ChunksExact.html#method.remainder
4023
4019
/// [slices]: ../../std/primitive.slice.html
4024
4020
#[ derive( Debug ) ]
4025
- #[ unstable ( feature = "chunks_exact" , issue = "47115 " ) ]
4021
+ #[ stable ( feature = "chunks_exact" , since = "1.31.0 " ) ]
4026
4022
pub struct ChunksExact < ' a , T : ' a > {
4027
4023
v : & ' a [ T ] ,
4028
4024
rem : & ' a [ T ] ,
4029
4025
chunk_size : usize
4030
4026
}
4031
4027
4032
- #[ unstable( feature = "chunks_exact" , issue = "47115" ) ]
4033
4028
impl < ' a , T > ChunksExact < ' a , T > {
4034
4029
/// Return the remainder of the original slice that is not going to be
4035
4030
/// returned by the iterator. The returned slice has at most `chunk_size-1`
4036
4031
/// elements.
4032
+ #[ stable( feature = "chunks_exact" , since = "1.31.0" ) ]
4037
4033
pub fn remainder ( & self ) -> & ' a [ T ] {
4038
4034
self . rem
4039
4035
}
4040
4036
}
4041
4037
4042
4038
// FIXME(#26925) Remove in favor of `#[derive(Clone)]`
4043
- #[ unstable ( feature = "chunks_exact" , issue = "47115 " ) ]
4039
+ #[ stable ( feature = "chunks_exact" , since = "1.31.0 " ) ]
4044
4040
impl < T > Clone for ChunksExact < ' _ , T > {
4045
4041
fn clone ( & self ) -> Self {
4046
4042
ChunksExact {
@@ -4051,7 +4047,7 @@ impl<T> Clone for ChunksExact<'_, T> {
4051
4047
}
4052
4048
}
4053
4049
4054
- #[ unstable ( feature = "chunks_exact" , issue = "47115 " ) ]
4050
+ #[ stable ( feature = "chunks_exact" , since = "1.31.0 " ) ]
4055
4051
impl < ' a , T > Iterator for ChunksExact < ' a , T > {
4056
4052
type Item = & ' a [ T ] ;
4057
4053
@@ -4096,7 +4092,7 @@ impl<'a, T> Iterator for ChunksExact<'a, T> {
4096
4092
}
4097
4093
}
4098
4094
4099
- #[ unstable ( feature = "chunks_exact" , issue = "47115 " ) ]
4095
+ #[ stable ( feature = "chunks_exact" , since = "1.31.0 " ) ]
4100
4096
impl < ' a , T > DoubleEndedIterator for ChunksExact < ' a , T > {
4101
4097
#[ inline]
4102
4098
fn next_back ( & mut self ) -> Option < & ' a [ T ] > {
@@ -4110,7 +4106,7 @@ impl<'a, T> DoubleEndedIterator for ChunksExact<'a, T> {
4110
4106
}
4111
4107
}
4112
4108
4113
- #[ unstable ( feature = "chunks_exact" , issue = "47115 " ) ]
4109
+ #[ stable ( feature = "chunks_exact" , since = "1.31.0 " ) ]
4114
4110
impl < T > ExactSizeIterator for ChunksExact < ' _ , T > {
4115
4111
fn is_empty ( & self ) -> bool {
4116
4112
self . v . is_empty ( )
@@ -4120,11 +4116,11 @@ impl<T> ExactSizeIterator for ChunksExact<'_, T> {
4120
4116
#[ unstable( feature = "trusted_len" , issue = "37572" ) ]
4121
4117
unsafe impl < T > TrustedLen for ChunksExact < ' _ , T > { }
4122
4118
4123
- #[ unstable ( feature = "chunks_exact" , issue = "47115 " ) ]
4119
+ #[ stable ( feature = "chunks_exact" , since = "1.31.0 " ) ]
4124
4120
impl < T > FusedIterator for ChunksExact < ' _ , T > { }
4125
4121
4126
4122
#[ doc( hidden) ]
4127
- #[ unstable ( feature = "chunks_exact" , issue = "47115 " ) ]
4123
+ #[ stable ( feature = "chunks_exact" , since = "1.31.0 " ) ]
4128
4124
unsafe impl < ' a , T > TrustedRandomAccess for ChunksExact < ' a , T > {
4129
4125
unsafe fn get_unchecked ( & mut self , i : usize ) -> & ' a [ T ] {
4130
4126
let start = i * self . chunk_size ;
@@ -4146,24 +4142,24 @@ unsafe impl<'a, T> TrustedRandomAccess for ChunksExact<'a, T> {
4146
4142
/// [`into_remainder`]: ../../std/slice/struct.ChunksExactMut.html#method.into_remainder
4147
4143
/// [slices]: ../../std/primitive.slice.html
4148
4144
#[ derive( Debug ) ]
4149
- #[ unstable ( feature = "chunks_exact" , issue = "47115 " ) ]
4145
+ #[ stable ( feature = "chunks_exact" , since = "1.31.0 " ) ]
4150
4146
pub struct ChunksExactMut < ' a , T : ' a > {
4151
4147
v : & ' a mut [ T ] ,
4152
4148
rem : & ' a mut [ T ] ,
4153
4149
chunk_size : usize
4154
4150
}
4155
4151
4156
- #[ unstable( feature = "chunks_exact" , issue = "47115" ) ]
4157
4152
impl < ' a , T > ChunksExactMut < ' a , T > {
4158
4153
/// Return the remainder of the original slice that is not going to be
4159
4154
/// returned by the iterator. The returned slice has at most `chunk_size-1`
4160
4155
/// elements.
4156
+ #[ stable( feature = "chunks_exact" , since = "1.31.0" ) ]
4161
4157
pub fn into_remainder ( self ) -> & ' a mut [ T ] {
4162
4158
self . rem
4163
4159
}
4164
4160
}
4165
4161
4166
- #[ unstable ( feature = "chunks_exact" , issue = "47115 " ) ]
4162
+ #[ stable ( feature = "chunks_exact" , since = "1.31.0 " ) ]
4167
4163
impl < ' a , T > Iterator for ChunksExactMut < ' a , T > {
4168
4164
type Item = & ' a mut [ T ] ;
4169
4165
@@ -4210,7 +4206,7 @@ impl<'a, T> Iterator for ChunksExactMut<'a, T> {
4210
4206
}
4211
4207
}
4212
4208
4213
- #[ unstable ( feature = "chunks_exact" , issue = "47115 " ) ]
4209
+ #[ stable ( feature = "chunks_exact" , since = "1.31.0 " ) ]
4214
4210
impl < ' a , T > DoubleEndedIterator for ChunksExactMut < ' a , T > {
4215
4211
#[ inline]
4216
4212
fn next_back ( & mut self ) -> Option < & ' a mut [ T ] > {
@@ -4226,7 +4222,7 @@ impl<'a, T> DoubleEndedIterator for ChunksExactMut<'a, T> {
4226
4222
}
4227
4223
}
4228
4224
4229
- #[ unstable ( feature = "chunks_exact" , issue = "47115 " ) ]
4225
+ #[ stable ( feature = "chunks_exact" , since = "1.31.0 " ) ]
4230
4226
impl < T > ExactSizeIterator for ChunksExactMut < ' _ , T > {
4231
4227
fn is_empty ( & self ) -> bool {
4232
4228
self . v . is_empty ( )
@@ -4236,11 +4232,11 @@ impl<T> ExactSizeIterator for ChunksExactMut<'_, T> {
4236
4232
#[ unstable( feature = "trusted_len" , issue = "37572" ) ]
4237
4233
unsafe impl < T > TrustedLen for ChunksExactMut < ' _ , T > { }
4238
4234
4239
- #[ unstable ( feature = "chunks_exact" , issue = "47115 " ) ]
4235
+ #[ stable ( feature = "chunks_exact" , since = "1.31.0 " ) ]
4240
4236
impl < T > FusedIterator for ChunksExactMut < ' _ , T > { }
4241
4237
4242
4238
#[ doc( hidden) ]
4243
- #[ unstable ( feature = "chunks_exact" , issue = "47115 " ) ]
4239
+ #[ stable ( feature = "chunks_exact" , since = "1.31.0 " ) ]
4244
4240
unsafe impl < ' a , T > TrustedRandomAccess for ChunksExactMut < ' a , T > {
4245
4241
unsafe fn get_unchecked ( & mut self , i : usize ) -> & ' a mut [ T ] {
4246
4242
let start = i * self . chunk_size ;
0 commit comments