Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign the std::iter::Step trait, tweak related iterator impls for ranges #43127

Closed
wants to merge 11 commits into from

Commits on Jul 24, 2017

  1. Configuration menu
    Copy the full SHA
    d103522 View commit details
    Browse the repository at this point in the history
  2. Don’t reset RangeInclusive to 1...0 after last iteration.

    Instead try to set start to end+1, and if that overflows set end to start-1.
    SimonSapin committed Jul 24, 2017
    Configuration menu
    Copy the full SHA
    3e8a762 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5334226 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    32d963e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9d4dc29 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c0b4440 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b270e7f View commit details
    Browse the repository at this point in the history
  8. Remove ExactSizeIterator impls for RangeInclusive<{i16,u16}>

    They are incorrect on 16-bit platforms since the return value
    of `len()` might overflow `usize`.
    
    Impls for `Range<u32>` and `Range<i32>` are similarly incorrect,
    but were stabilized in Rust 1.0.0
    so removing them would be a breaking change.
    
    `(0..66_000_u32).len()` for example will compile
    without error or warnings on 16-bit platforms, but panic at run-time.
    SimonSapin committed Jul 24, 2017
    Configuration menu
    Copy the full SHA
    287ce4c View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    eed9884 View commit details
    Browse the repository at this point in the history
  10. Make tidy happy

    SimonSapin committed Jul 24, 2017
    Configuration menu
    Copy the full SHA
    0a62269 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    0ac7fca View commit details
    Browse the repository at this point in the history