]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #22299 - bluss:range-64-is-not-exact-size, r=alexcrichton
authorManish Goregaokar <manishsmail@gmail.com>
Sun, 15 Feb 2015 13:00:56 +0000 (18:30 +0530)
committerManish Goregaokar <manishsmail@gmail.com>
Sun, 15 Feb 2015 13:12:44 +0000 (18:42 +0530)
 Fixes #22047

`Range<u64>` and `Range<i64>` may be longer than usize::MAX on 32-bit
platforms, and thus they cannot fulfill the protocol for
ExactSizeIterator. We don't want a nonobvious platform dependency in
basic iterator traits, so the trait impl is removed.

The logic of this change assumes that usize is at least 32-bit.

This is technically a breaking change; note that `Range<usize>` and
`Range<isize>` are always ExactSizeIterators.

[breaking-change]


Trivial merge