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

Rollup of 7 pull requests #63744

Merged
merged 14 commits into from
Aug 20, 2019
Merged

Rollup of 7 pull requests #63744

merged 14 commits into from
Aug 20, 2019

Commits on Aug 4, 2019

  1. Configuration menu
    Copy the full SHA
    d3019d1 View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2019

  1. avoid unnecessary reservations in std::io::Take::read_to_end

    Prevously the `read_to_end` implementation for `std::io::Take` used its
    own `limit` as a cap on the `reservation_size`. However, that could
    still result in an over-allocation like this:
    
    1. Call `reader.take(5).read_to_end(&mut vec)`.
    2. `read_to_end_with_reservation` reserves 5 bytes and calls `read`.
    3. `read` writes 5 bytes.
    4. `read_to_end_with_reservation` reserves 5 bytes and calls `read`.
    5. `read` writes 0 bytes.
    6. The read loop ends with `vec` having length 5 and capacity 10.
    
    The reservation of 5 bytes was correct for the read at step 2 but
    unnecessary for the read at step 4. By that second read, `Take::limit`
    is 0, but the `read_to_end_with_reservation` loop is still using the
    same `reservation_size` it started with.
    
    Solve this by having `read_to_end_with_reservation` take a closure,
    which lets it get a fresh `reservation_size` for each read. This is an
    implementation detail which doesn't affect any public API.
    oconnor663 committed Aug 6, 2019
    Configuration menu
    Copy the full SHA
    edb5214 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2019

  1. Configuration menu
    Copy the full SHA
    ec54340 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2019

  1. Don't use stage naming in RUSTFLAGS environment variables

    This patch supports less behavior than before, since specifiying stage 1
    vs stage 2 is no longer possible, but that is presumably a somewhat rare
    use case anyway, so not supporting it seems acceptable (and it can be
    readded easily if desired).
    Mark-Simulacrum committed Aug 19, 2019
    Configuration menu
    Copy the full SHA
    9b3f072 View commit details
    Browse the repository at this point in the history
  2. Consolidate sigemptyset workarounds

    In sys/unix/process, we work around the sigemptyset linking issues
    on android in two different ways. This change consolidates these
    workarounds, and avoids duplicating bindings from `libc`.
    josephlr committed Aug 19, 2019
    Configuration menu
    Copy the full SHA
    8e91dca View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2019

  1. Restore the rustc_plugin crate in the sysroot

    It was accidentally removed in a rebase of rust-lang#62727
    
    Fixes rust-lang#63729
    SimonSapin committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    c561abe View commit details
    Browse the repository at this point in the history
  2. Allow git to merge Cargo.lock

    This commit backs out rust-lang#46539 in order to fully leverage rust-lang#63579 where
    `git` should be able to merge `Cargo.lock` nowadays with only minimal
    conflicts.
    alexcrichton committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    815ce8c View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#63216 - oconnor663:take_read_to_end, r=sfac…

    …kler
    
    avoid unnecessary reservations in std::io::Take::read_to_end
    
    Prevously the `read_to_end` implementation for `std::io::Take` used its
    own `limit` as a cap on the `reservation_size`. However, that could
    still result in an over-allocation like this:
    
    1. Call `reader.take(5).read_to_end(&mut vec)`.
    2. `read_to_end_with_reservation` reserves 5 bytes and calls `read`.
    3. `read` writes 5 bytes.
    4. `read_to_end_with_reservation` reserves 5 bytes and calls `read`.
    5. `read` writes 0 bytes.
    6. The read loop ends with `vec` having length 5 and capacity 10.
    
    The reservation of 5 bytes was correct for the read at step 2 but
    unnecessary for the read at step 4. By that second read, `Take::limit`
    is 0, but the `read_to_end_with_reservation` loop is still using the
    same `reservation_size` it started with.
    
    Solve this by having `read_to_end_with_reservation` take a closure,
    which lets it get a fresh `reservation_size` for each read. This is an
    implementation detail which doesn't affect any public API.
    Centril committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    a5299dd View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#63265 - JohnTitor:implement-nth-back-for-ch…

    …unksexactmut, r=scottmcm
    
    Implement `nth_back` for ChunksExactMut
    
    This is a part of rust-lang#54054.
    
    r? @scottmcm
    Centril committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    60649e3 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#63691 - timvermeulen:chain-size-hint, r=sco…

    …ttmcm
    
    Fix bug in iter::Chain::size_hint
    
    `Chain::size_hint` currently ignores `self.state`, which means that the size hints of the underlying iterators are always combined regardless of the iteration state. This, of course, should only happen when the state is `ChainState::Both`.
    Centril committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    ff352cd View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#63722 - Mark-Simulacrum:bootstrap-rustflags…

    …, r=alexcrichton
    
    Don't use stage naming in RUSTFLAGS environment variables
    
    This patch supports less behavior than before, since specifiying stage 1
    vs stage 2 is no longer possible, but that is presumably a somewhat rare
    use case anyway, so not supporting it seems acceptable (and it can be
    readded easily if desired).
    
    Fixes rust-lang#33609
    Centril committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    af77aed View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#63723 - josephlr:sigemptyset, r=alexcrichton

    Consolidate sigemptyset workarounds
    
    In sys/unix/process, we work around the sigemptyset linking issues
    on android in two different ways. This change consolidates these
    workarounds, and avoids duplicating bindings from `libc`.
    Centril committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    3662a9f View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#63736 - SimonSapin:plugin, r=eddyb

    Restore the rustc_plugin crate in the sysroot
    
    It was accidentally removed in a rebase of rust-lang#62727
    
    Fixes rust-lang#63729 (rls build failure)
    Centril committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    cadf6b9 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#63743 - alexcrichton:allow-lock-merge, r=Ma…

    …rk-Simulacrum
    
    Allow git to merge `Cargo.lock`
    
    This commit backs out rust-lang#46539 in order to fully leverage rust-lang#63579 where
    `git` should be able to merge `Cargo.lock` nowadays with only minimal
    conflicts.
    Centril committed Aug 20, 2019
    Configuration menu
    Copy the full SHA
    218bcf2 View commit details
    Browse the repository at this point in the history