@@ -8,9 +8,9 @@ use crate::{intrinsics, mem};
88/// By-value [`Range`] iterator.
99#[ unstable( feature = "new_range_api" , issue = "125687" ) ]
1010#[ derive( Debug , Clone ) ]
11- pub struct IterRange < A > ( legacy:: Range < A > ) ;
11+ pub struct RangeIter < A > ( legacy:: Range < A > ) ;
1212
13- impl < A > IterRange < A > {
13+ impl < A > RangeIter < A > {
1414 /// Returns the remainder of the range being iterated over.
1515 pub fn remainder ( self ) -> Range < A > {
1616 Range { start : self . 0 . start , end : self . 0 . end }
@@ -23,11 +23,11 @@ macro_rules! unsafe_range_trusted_random_access_impl {
2323 ( $( $t: ty) * ) => ( $(
2424 #[ doc( hidden) ]
2525 #[ unstable( feature = "trusted_random_access" , issue = "none" ) ]
26- unsafe impl TrustedRandomAccess for IterRange <$t> { }
26+ unsafe impl TrustedRandomAccess for RangeIter <$t> { }
2727
2828 #[ doc( hidden) ]
2929 #[ unstable( feature = "trusted_random_access" , issue = "none" ) ]
30- unsafe impl TrustedRandomAccessNoCoerce for IterRange <$t> {
30+ unsafe impl TrustedRandomAccessNoCoerce for RangeIter <$t> {
3131 const MAY_HAVE_SIDE_EFFECT : bool = false ;
3232 }
3333 ) * )
@@ -50,7 +50,7 @@ unsafe_range_trusted_random_access_impl! {
5050}
5151
5252#[ unstable( feature = "new_range_api" , issue = "125687" ) ]
53- impl < A : Step > Iterator for IterRange < A > {
53+ impl < A : Step > Iterator for RangeIter < A > {
5454 type Item = A ;
5555
5656 #[ inline]
@@ -118,7 +118,7 @@ impl<A: Step> Iterator for IterRange<A> {
118118}
119119
120120#[ unstable( feature = "new_range_api" , issue = "125687" ) ]
121- impl < A : Step > DoubleEndedIterator for IterRange < A > {
121+ impl < A : Step > DoubleEndedIterator for RangeIter < A > {
122122 #[ inline]
123123 fn next_back ( & mut self ) -> Option < A > {
124124 self . 0 . next_back ( )
@@ -136,27 +136,27 @@ impl<A: Step> DoubleEndedIterator for IterRange<A> {
136136}
137137
138138#[ unstable( feature = "trusted_len" , issue = "37572" ) ]
139- unsafe impl < A : TrustedStep > TrustedLen for IterRange < A > { }
139+ unsafe impl < A : TrustedStep > TrustedLen for RangeIter < A > { }
140140
141141#[ unstable( feature = "new_range_api" , issue = "125687" ) ]
142- impl < A : Step > FusedIterator for IterRange < A > { }
142+ impl < A : Step > FusedIterator for RangeIter < A > { }
143143
144144#[ unstable( feature = "new_range_api" , issue = "125687" ) ]
145145impl < A : Step > IntoIterator for Range < A > {
146146 type Item = A ;
147- type IntoIter = IterRange < A > ;
147+ type IntoIter = RangeIter < A > ;
148148
149149 fn into_iter ( self ) -> Self :: IntoIter {
150- IterRange ( self . into ( ) )
150+ RangeIter ( self . into ( ) )
151151 }
152152}
153153
154154/// By-value [`RangeInclusive`] iterator.
155155#[ unstable( feature = "new_range_api" , issue = "125687" ) ]
156156#[ derive( Debug , Clone ) ]
157- pub struct IterRangeInclusive < A > ( legacy:: RangeInclusive < A > ) ;
157+ pub struct RangeInclusiveIter < A > ( legacy:: RangeInclusive < A > ) ;
158158
159- impl < A : Step > IterRangeInclusive < A > {
159+ impl < A : Step > RangeInclusiveIter < A > {
160160 /// Returns the remainder of the range being iterated over.
161161 ///
162162 /// If the iterator is exhausted or empty, returns `None`.
@@ -170,7 +170,7 @@ impl<A: Step> IterRangeInclusive<A> {
170170}
171171
172172#[ unstable( feature = "new_range_api" , issue = "125687" ) ]
173- impl < A : Step > Iterator for IterRangeInclusive < A > {
173+ impl < A : Step > Iterator for RangeInclusiveIter < A > {
174174 type Item = A ;
175175
176176 #[ inline]
@@ -226,7 +226,7 @@ impl<A: Step> Iterator for IterRangeInclusive<A> {
226226}
227227
228228#[ unstable( feature = "new_range_api" , issue = "125687" ) ]
229- impl < A : Step > DoubleEndedIterator for IterRangeInclusive < A > {
229+ impl < A : Step > DoubleEndedIterator for RangeInclusiveIter < A > {
230230 #[ inline]
231231 fn next_back ( & mut self ) -> Option < A > {
232232 self . 0 . next_back ( )
@@ -244,18 +244,18 @@ impl<A: Step> DoubleEndedIterator for IterRangeInclusive<A> {
244244}
245245
246246#[ unstable( feature = "trusted_len" , issue = "37572" ) ]
247- unsafe impl < A : TrustedStep > TrustedLen for IterRangeInclusive < A > { }
247+ unsafe impl < A : TrustedStep > TrustedLen for RangeInclusiveIter < A > { }
248248
249249#[ unstable( feature = "new_range_api" , issue = "125687" ) ]
250- impl < A : Step > FusedIterator for IterRangeInclusive < A > { }
250+ impl < A : Step > FusedIterator for RangeInclusiveIter < A > { }
251251
252252#[ unstable( feature = "new_range_api" , issue = "125687" ) ]
253253impl < A : Step > IntoIterator for RangeInclusive < A > {
254254 type Item = A ;
255- type IntoIter = IterRangeInclusive < A > ;
255+ type IntoIter = RangeInclusiveIter < A > ;
256256
257257 fn into_iter ( self ) -> Self :: IntoIter {
258- IterRangeInclusive ( self . into ( ) )
258+ RangeInclusiveIter ( self . into ( ) )
259259 }
260260}
261261
@@ -270,14 +270,14 @@ impl<A: Step> IntoIterator for RangeInclusive<A> {
270270macro_rules! range_exact_iter_impl {
271271 ( $( $t: ty) * ) => ( $(
272272 #[ unstable( feature = "new_range_api" , issue = "125687" ) ]
273- impl ExactSizeIterator for IterRange <$t> { }
273+ impl ExactSizeIterator for RangeIter <$t> { }
274274 ) * )
275275}
276276
277277macro_rules! range_incl_exact_iter_impl {
278278 ( $( $t: ty) * ) => ( $(
279279 #[ unstable( feature = "new_range_api" , issue = "125687" ) ]
280- impl ExactSizeIterator for IterRangeInclusive <$t> { }
280+ impl ExactSizeIterator for RangeInclusiveIter <$t> { }
281281 ) * )
282282}
283283
@@ -294,14 +294,14 @@ range_incl_exact_iter_impl! {
294294/// By-value [`RangeFrom`] iterator.
295295#[ unstable( feature = "new_range_api" , issue = "125687" ) ]
296296#[ derive( Debug , Clone ) ]
297- pub struct IterRangeFrom < A > {
297+ pub struct RangeFromIter < A > {
298298 start : A ,
299299 /// Whether the first element of the iterator has yielded.
300300 /// Only used when overflow checks are enabled.
301301 first : bool ,
302302}
303303
304- impl < A : Step > IterRangeFrom < A > {
304+ impl < A : Step > RangeFromIter < A > {
305305 /// Returns the remainder of the range being iterated over.
306306 #[ inline]
307307 #[ rustc_inherit_overflow_checks]
@@ -317,7 +317,7 @@ impl<A: Step> IterRangeFrom<A> {
317317}
318318
319319#[ unstable( feature = "new_range_api" , issue = "125687" ) ]
320- impl < A : Step > Iterator for IterRangeFrom < A > {
320+ impl < A : Step > Iterator for RangeFromIter < A > {
321321 type Item = A ;
322322
323323 #[ inline]
@@ -366,17 +366,17 @@ impl<A: Step> Iterator for IterRangeFrom<A> {
366366}
367367
368368#[ unstable( feature = "trusted_len" , issue = "37572" ) ]
369- unsafe impl < A : TrustedStep > TrustedLen for IterRangeFrom < A > { }
369+ unsafe impl < A : TrustedStep > TrustedLen for RangeFromIter < A > { }
370370
371371#[ unstable( feature = "new_range_api" , issue = "125687" ) ]
372- impl < A : Step > FusedIterator for IterRangeFrom < A > { }
372+ impl < A : Step > FusedIterator for RangeFromIter < A > { }
373373
374374#[ unstable( feature = "new_range_api" , issue = "125687" ) ]
375375impl < A : Step > IntoIterator for RangeFrom < A > {
376376 type Item = A ;
377- type IntoIter = IterRangeFrom < A > ;
377+ type IntoIter = RangeFromIter < A > ;
378378
379379 fn into_iter ( self ) -> Self :: IntoIter {
380- IterRangeFrom { start : self . start , first : true }
380+ RangeFromIter { start : self . start , first : true }
381381 }
382382}
0 commit comments