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

Backport accepted PRs to beta #26161

Merged
merged 6 commits into from
Jun 11, 2015
Merged

Commits on Jun 10, 2015

  1. std: Make abs() panic on overflow in debug mode

    Debug overflow checks for arithmetic negation landed in rust-lang#24500, at which time
    the `abs` method on signed integers was changed to using `wrapping_neg` to
    ensure that the function never panicked. This implied that `abs` of `INT_MIN`
    would return `INT_MIN`, another negative value. When this change was back-ported
    to beta, however, in rust-lang#24708, the `wrapping_neg` function had not yet been
    backported, so the implementation was changed in rust-lang#24785 to `!self + 1`. This
    change had the unintended side effect of enabling debug overflow checks for the
    `abs` function. Consequently, the current state of affairs is that the beta
    branch checks for overflow in debug mode for `abs` and the nightly branch does
    not.
    
    This commit alters the behavior of nightly to have `abs` always check for
    overflow in debug mode. This change is more consistent with the way the standard
    library treats overflow as well, and it is also not a breaking change as it's
    what the beta branch currently does (albeit if by accident).
    
    cc rust-lang#25378
    alexcrichton committed Jun 10, 2015
    Configuration menu
    Copy the full SHA
    9febb89 View commit details
    Browse the repository at this point in the history
  2. std: Fix missing stability on iter::Cloned

    The method was stabilized but the structure was forgotten to be stabilized.
    
    Closes rust-lang#25480
    alexcrichton committed Jun 10, 2015
    Configuration menu
    Copy the full SHA
    0e38e76 View commit details
    Browse the repository at this point in the history
  3. std: Reexport std::net::tcp::Incoming

    This iterator was mistakenly not reexported at the top level, preventing
    actually naming the type!
    
    Closes rust-lang#25519
    alexcrichton committed Jun 10, 2015
    Configuration menu
    Copy the full SHA
    322ae05 View commit details
    Browse the repository at this point in the history
  4. collections: Make BinaryHeap panic safe in sift_up / sift_down

    Use a struct called Hole that keeps track of an invalid location
    in the vector and fills the hole on drop.
    
    I include a run-pass test that the current BinaryHeap fails, and the new
    one passes.
    
    Fixes rust-lang#25842
    Ulrik Sverdrup authored and alexcrichton committed Jun 10, 2015
    Configuration menu
    Copy the full SHA
    2cc6e8f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1c0b2f4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    48ff33c View commit details
    Browse the repository at this point in the history