@@ -13,7 +13,7 @@ use mem;
1313use ops:: { self , Add , Sub } ;
1414use usize;
1515
16- use super :: { FusedIterator , TrustedLen , Sum } ;
16+ use super :: { FusedIterator , TrustedLen } ;
1717
1818/// Objects that can be stepped over in both directions.
1919///
@@ -177,20 +177,6 @@ step_impl_signed!([i64: u64]);
177177step_impl_no_between ! ( u64 i64 ) ;
178178step_impl_no_between ! ( u128 i128 ) ;
179179
180- macro_rules! range_inc_iter_impl {
181- ( $( $t: ty) * ) => ( $(
182- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
183- impl Iterator for ops:: RangeInclusive <$t> {
184- #[ inline]
185- fn sum<S >( self ) -> S where S : Sum <$t> {
186- let a = self . start;
187- let b = self . end;
188- S :: sum( super :: once( ( a + b) * ( 1 + b - a) / 2 ) )
189- }
190- }
191- ) * )
192- }
193-
194180macro_rules! range_exact_iter_impl {
195181 ( $( $t: ty) * ) => ( $(
196182 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -274,9 +260,6 @@ impl<A: Step> Iterator for ops::Range<A> {
274260 }
275261}
276262
277- // These macros generate specialisations for `Iterator` methods for efficiency purposes.
278- range_inc_iter_impl ! ( usize u8 u16 u32 u64 isize i8 i16 i32 i64 ) ;
279-
280263// These macros generate `ExactSizeIterator` impls for various range types.
281264// Range<{u,i}64> and RangeInclusive<{u,i}{32,64,size}> are excluded
282265// because they cannot guarantee having a length <= usize::MAX, which is
0 commit comments