File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -1749,14 +1749,12 @@ impl<A: Add<A, A> + Ord + Clone> Iterator<A> for Range<A> {
17491749 // Blocked on #8605 Need numeric trait for converting to `Option<uint>`
17501750}
17511751
1752- impl < A : Sub < A , A > + Integer + Ord + Clone > DoubleEndedIterator < A > for Range < A > {
1752+ /// `Integer` is required to ensure the range will be the same regardless of
1753+ /// the direction it is consumed.
1754+ impl < A : Integer + Ord + Clone > DoubleEndedIterator < A > for Range < A > {
17531755 #[ inline]
17541756 fn next_back ( & mut self ) -> Option < A > {
17551757 if self . stop > self . state {
1756- // Integer doesn't technically define this rule, but we're going to assume that every
1757- // Integer is reachable from every other one by adding or subtracting enough Ones. This
1758- // seems like a reasonable-enough rule that every Integer should conform to, even if it
1759- // can't be statically checked.
17601758 self . stop = self . stop - self . one ;
17611759 Some ( self . stop . clone ( ) )
17621760 } else {
You can’t perform that action at this time.
0 commit comments