Commit b19fda0
Ulrik Sverdrup
Remove ExactSizeIterator from 64-bit ranges.
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 parent cf636c2 commit b19fda0
1 file changed
Lines changed: 2 additions & 2 deletions
| 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