@@ -2541,6 +2541,12 @@ macro_rules! iterator {
2541
2541
accum
2542
2542
}
2543
2543
}
2544
+
2545
+ #[ stable( feature = "fused" , since = "1.26.0" ) ]
2546
+ impl <' a, T > FusedIterator for $name<' a, T > { }
2547
+
2548
+ #[ unstable( feature = "trusted_len" , issue = "37572" ) ]
2549
+ unsafe impl <' a, T > TrustedLen for $name<' a, T > { }
2544
2550
}
2545
2551
}
2546
2552
@@ -2667,12 +2673,6 @@ impl<'a, T> ExactSizeIterator for Iter<'a, T> {
2667
2673
}
2668
2674
}
2669
2675
2670
- #[ stable( feature = "fused" , since = "1.26.0" ) ]
2671
- impl < ' a , T > FusedIterator for Iter < ' a , T > { }
2672
-
2673
- #[ unstable( feature = "trusted_len" , issue = "37572" ) ]
2674
- unsafe impl < ' a , T > TrustedLen for Iter < ' a , T > { }
2675
-
2676
2676
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2677
2677
impl < ' a , T > Clone for Iter < ' a , T > {
2678
2678
fn clone ( & self ) -> Iter < ' a , T > { Iter { ptr : self . ptr , end : self . end , _marker : self . _marker } }
@@ -2734,9 +2734,7 @@ impl<'a, T> IterMut<'a, T> {
2734
2734
/// View the underlying data as a subslice of the original data.
2735
2735
///
2736
2736
/// To avoid creating `&mut` references that alias, this is forced
2737
- /// to consume the iterator. Consider using the `Slice` and
2738
- /// `SliceMut` implementations for obtaining slices with more
2739
- /// restricted lifetimes that do not consume the iterator.
2737
+ /// to consume the iterator.
2740
2738
///
2741
2739
/// # Examples
2742
2740
///
@@ -2795,13 +2793,6 @@ impl<'a, T> ExactSizeIterator for IterMut<'a, T> {
2795
2793
}
2796
2794
}
2797
2795
2798
- #[ stable( feature = "fused" , since = "1.26.0" ) ]
2799
- impl < ' a , T > FusedIterator for IterMut < ' a , T > { }
2800
-
2801
- #[ unstable( feature = "trusted_len" , issue = "37572" ) ]
2802
- unsafe impl < ' a , T > TrustedLen for IterMut < ' a , T > { }
2803
-
2804
-
2805
2796
// Return the number of elements of `T` from `start` to `end`.
2806
2797
// Return the arithmetic difference if `T` is zero size.
2807
2798
#[ inline( always) ]
@@ -3399,6 +3390,9 @@ impl<'a, T> DoubleEndedIterator for Windows<'a, T> {
3399
3390
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
3400
3391
impl < ' a , T > ExactSizeIterator for Windows < ' a , T > { }
3401
3392
3393
+ #[ unstable( feature = "trusted_len" , issue = "37572" ) ]
3394
+ unsafe impl < ' a , T > TrustedLen for Windows < ' a , T > { }
3395
+
3402
3396
#[ stable( feature = "fused" , since = "1.26.0" ) ]
3403
3397
impl < ' a , T > FusedIterator for Windows < ' a , T > { }
3404
3398
@@ -3518,6 +3512,9 @@ impl<'a, T> DoubleEndedIterator for Chunks<'a, T> {
3518
3512
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
3519
3513
impl < ' a , T > ExactSizeIterator for Chunks < ' a , T > { }
3520
3514
3515
+ #[ unstable( feature = "trusted_len" , issue = "37572" ) ]
3516
+ unsafe impl < ' a , T > TrustedLen for Chunks < ' a , T > { }
3517
+
3521
3518
#[ stable( feature = "fused" , since = "1.26.0" ) ]
3522
3519
impl < ' a , T > FusedIterator for Chunks < ' a , T > { }
3523
3520
@@ -3634,6 +3631,9 @@ impl<'a, T> DoubleEndedIterator for ChunksMut<'a, T> {
3634
3631
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
3635
3632
impl < ' a , T > ExactSizeIterator for ChunksMut < ' a , T > { }
3636
3633
3634
+ #[ unstable( feature = "trusted_len" , issue = "37572" ) ]
3635
+ unsafe impl < ' a , T > TrustedLen for ChunksMut < ' a , T > { }
3636
+
3637
3637
#[ stable( feature = "fused" , since = "1.26.0" ) ]
3638
3638
impl < ' a , T > FusedIterator for ChunksMut < ' a , T > { }
3639
3639
@@ -3744,6 +3744,9 @@ impl<'a, T> ExactSizeIterator for ExactChunks<'a, T> {
3744
3744
}
3745
3745
}
3746
3746
3747
+ #[ unstable( feature = "trusted_len" , issue = "37572" ) ]
3748
+ unsafe impl < ' a , T > TrustedLen for ExactChunks < ' a , T > { }
3749
+
3747
3750
#[ unstable( feature = "exact_chunks" , issue = "47115" ) ]
3748
3751
impl < ' a , T > FusedIterator for ExactChunks < ' a , T > { }
3749
3752
@@ -3841,6 +3844,9 @@ impl<'a, T> ExactSizeIterator for ExactChunksMut<'a, T> {
3841
3844
}
3842
3845
}
3843
3846
3847
+ #[ unstable( feature = "trusted_len" , issue = "37572" ) ]
3848
+ unsafe impl < ' a , T > TrustedLen for ExactChunksMut < ' a , T > { }
3849
+
3844
3850
#[ unstable( feature = "exact_chunks" , issue = "47115" ) ]
3845
3851
impl < ' a , T > FusedIterator for ExactChunksMut < ' a , T > { }
3846
3852
0 commit comments