@@ -13,7 +13,7 @@ use mem;
13
13
use ops:: { self , Add , Sub } ;
14
14
use usize;
15
15
16
- use super :: { FusedIterator , TrustedLen , Sum } ;
16
+ use super :: { FusedIterator , TrustedLen } ;
17
17
18
18
/// Objects that can be stepped over in both directions.
19
19
///
@@ -177,20 +177,6 @@ step_impl_signed!([i64: u64]);
177
177
step_impl_no_between ! ( u64 i64 ) ;
178
178
step_impl_no_between ! ( u128 i128 ) ;
179
179
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
-
194
180
macro_rules! range_exact_iter_impl {
195
181
( $( $t: ty) * ) => ( $(
196
182
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -274,9 +260,6 @@ impl<A: Step> Iterator for ops::Range<A> {
274
260
}
275
261
}
276
262
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
-
280
263
// These macros generate `ExactSizeIterator` impls for various range types.
281
264
// Range<{u,i}64> and RangeInclusive<{u,i}{32,64,size}> are excluded
282
265
// because they cannot guarantee having a length <= usize::MAX, which is
0 commit comments