Commit 1b86ebe
committed
Rollup merge of #22299 - bluss:range-64-is-not-exact-size, r=alexcrichton
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]1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2676 | 2676 | | |
2677 | 2677 | | |
2678 | 2678 | | |
| 2679 | + | |
| 2680 | + | |
2679 | 2681 | | |
2680 | | - | |
2681 | | - | |
2682 | 2682 | | |
2683 | 2683 | | |
2684 | 2684 | | |
| |||
0 commit comments