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 10 pull requests #59300

Closed
wants to merge 31 commits into from
Closed

Rollup of 10 pull requests #59300

wants to merge 31 commits into from

Commits on Mar 3, 2019

  1. Configuration menu
    Copy the full SHA
    2131b15 View commit details
    Browse the repository at this point in the history
  2. Don't incorrectly mark blocks in generator drop shims as cleanup

    This also ensure that dropping a generator won't leak upvars if dropping
    one of them panics
    matthewjasper committed Mar 3, 2019
    Configuration menu
    Copy the full SHA
    8a78019 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5e68c57 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2019

  1. Fix buffer invalidation for BufRead

    There are two moments when a BufRead object needs to empty it's internal
    buffer:
    
    - In a seek call;
    - In a read call when all data in the internal buffer had been already
      consumed and the output buffer has a greater or equal size than the
      internal buffer.
    
    In both cases, the buffer was not being properly emptied, but only
    marked as consumed (self.pos = self.cap). That should be no problem if
    the inner reader is only Read, but if it is Seek as well, then it's
    possible to access the data in the buffer by using the seek_relative
    method. In order to prevent this from happening, both self.pos and
    self.cap should be set to 0.
    
    Two test cases were added to detect that failure:
    
    - test_buffered_reader_invalidated_after_read
    - test_buffered_reader_invalidated_after_seek
    
    Both tests are very similar to each other. The inner reader contains the
    following data: [5, 6, 7, 0, 1, 2, 3, 4]. The buffer capacity is 3
    bytes.
    
    - First, we call fill_buffer, which loads [5, 6, 7] into the internal
      buffer, and then consume those 3 bytes.
    - Then we either read the 5 remaining bytes in a single read call or we
      move to the end of the stream by calling seek. In both cases the
      buffer should be emptied to prevent the previous data [5, 6, 7] from
      being read.
    - We now call seek_relative(-2) and read two bytes, which should give us
      the last 2 bytes of the stream: [3, 4].
    
    Before this commit, the the seek_relative method would consider that
    we're still in the range of the internal buffer, so instead of fetching
    data from the inner reader, it would return the two last bytes that were
    incorrectly still in the buffer: [6, 7]. Therefore, the test would fail.
    
    Now, when seek_relative is called the buffer is empty. So the expected
    data [3, 4] is fetched from the inner reader and the test passes.
    andre-vm authored and André Vicente Milack committed Mar 6, 2019
    Configuration menu
    Copy the full SHA
    96e361f View commit details
    Browse the repository at this point in the history
  2. Fix buffer invalidation at BufReader.read_vectored

    André Vicente Milack committed Mar 6, 2019
    Configuration menu
    Copy the full SHA
    c36d91c View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2019

  1. refactor build-mainfest.

    Centril committed Mar 10, 2019
    Configuration menu
    Copy the full SHA
    8353487 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2019

  1. Configuration menu
    Copy the full SHA
    ff5e31f View commit details
    Browse the repository at this point in the history
  2. Remove trailing newlines

    varkor committed Mar 14, 2019
    Configuration menu
    Copy the full SHA
    6e449da View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    205ab0c View commit details
    Browse the repository at this point in the history
  4. Add links to @rust-highfive and @bors

    varkor committed Mar 14, 2019
    Configuration menu
    Copy the full SHA
    6f3fda9 View commit details
    Browse the repository at this point in the history
  5. Update r+ syntax

    varkor committed Mar 14, 2019
    Configuration menu
    Copy the full SHA
    eadb844 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    308a002 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3a00649 View commit details
    Browse the repository at this point in the history
  8. Fix capitalisation problem

    varkor committed Mar 14, 2019
    Configuration menu
    Copy the full SHA
    037596c View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    541ad45 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2019

  1. Fix undefined behavior in hint::spin_loop for x86 targets without SSE2

    The pause instruction requires SSE2 but was being unconditionally used
    on targets without it, resulting in undefined behavior.
    
    This PR fixes that by only using the pause intrinsic if SSE2 is available.
    
    It also removes the inline assembly which was not required since these
    instructions are available in core::arch, and extends support of
    the spin_loop hint to arm targets with the v6 feature which also
    support the yield instruction.
    
    Closes rust-lang#59237 .
    gnzlbg committed Mar 16, 2019
    Configuration menu
    Copy the full SHA
    e07d163 View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2019

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

Commits on Mar 18, 2019

  1. Do not complain about non-existing fields after parse recovery

    When failing to parse struct-like enum variants, the ADT gets recorded
    as having no fields. Record that we have actually recovered during
    parsing of this variant to avoid complaing about non-existing fields
    when actually using it.
    estebank committed Mar 18, 2019
    Configuration menu
    Copy the full SHA
    6007e6f View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2019

  1. Configuration menu
    Copy the full SHA
    30d5dc9 View commit details
    Browse the repository at this point in the history
  2. review comments

    estebank committed Mar 19, 2019
    Configuration menu
    Copy the full SHA
    757eb67 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#58902 - matthewjasper:generator-cleanup-blo…

    …cks, r=davidtwco
    
    Fixes for the generator transform
    
    * Moves cleanup annotations in pretty printed MIR so that they can be tested
    * Correctly determines which drops are in cleanup blocks when elaborating generator drops
    * Use the correct state for poisoning a generator
    
    Closes rust-lang#58892
    Centril authored Mar 19, 2019
    Configuration menu
    Copy the full SHA
    fdb2ecd View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#58913 - Milack27:patch_buf_reader, r=joshtr…

    …iplett
    
    Add new test case for possible bug in BufReader
    
    When reading a large chunk from a BufReader, if all the bytes from the buffer have been already consumed, the internal buffer is bypassed entirely. However, it is not invalidated, and it's possible to access its contents using the `seek_relative` method, because it tries to reuse the existing buffer.
    Centril authored Mar 19, 2019
    Configuration menu
    Copy the full SHA
    0329e03 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#58927 - GuillaumeGomez:default-keyword, r=Q…

    …uietMisdreavus
    
    Add default keyword handling in rustdoc
    
    Fixes rust-lang#58898.
    
    r? @QuietMisdreavus
    Centril authored Mar 19, 2019
    Configuration menu
    Copy the full SHA
    9176c71 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#58995 - Centril:refactor-build-manifest, r=…

    …alexcrichton
    
    Refactor tools/build-mainfest
    
    I saw some duplication in rust-lang#58990 and got an itch... Will likely need to be rebased when that lands. Hopefully the PR should have zero semantic changes...
    
    r? @alexcrichton
    Centril authored Mar 19, 2019
    Configuration menu
    Copy the full SHA
    0612ad0 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#59172 - varkor:contributing-contributions, …

    …r=steveklabnik
    
    Update and clean up several parts of CONTRIBUTING.md
    Centril authored Mar 19, 2019
    Configuration menu
    Copy the full SHA
    46cae3e View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#59239 - gnzlbg:fix_spin_loop, r=nagisa

    Remove inline assembly from hint::spin_loop
    
    This PR removes the inline assembly which was not required since these
    instructions are available in core::arch, and extends support of
    the spin_loop hint to arm targets with the v6 feature which also
    support the yield instruction.
    Centril authored Mar 19, 2019
    Configuration menu
    Copy the full SHA
    703e351 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#59251 - matthewjasper:fix-graphviz, r=petro…

    …chenkov
    
    Use a valid name for graphviz graphs
    
    Hiridification has broken graphviz output because `HirId` has a more complex display implemetation than `NodeId`. Since the id was just used to generate a distinct identifier, we just pull out the various constituent indexed.
    Centril authored Mar 19, 2019
    Configuration menu
    Copy the full SHA
    29af625 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#59256 - petrochenkov:derval2, r=Zoxc

    Make meta-item API compatible with `LocalInternedString::get` soundness fix
    
    r? @Zoxc
    Centril authored Mar 19, 2019
    Configuration menu
    Copy the full SHA
    e6e1ccb View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#59266 - estebank:struct-parse-recovery, r=p…

    …etrochenkov
    
    Do not complain about non-existing fields after parse recovery
    
    When failing to parse struct-like enum variants, the ADT gets recorded
    as having no fields. Record that we have actually recovered during
    parsing of this variant to avoid complaing about non-existing fields
    when actually using it.
    
    Fix rust-lang#57361.
    Centril authored Mar 19, 2019
    Configuration menu
    Copy the full SHA
    3ff78d4 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#59296 - petrochenkov:stdup, r=estebank

    Do not encode gensymed imports in metadata
    
    (Unless they are underscore `_` imports which are re-gensymed on crate loading, see rust-lang#56392.)
    
    We cannot encode gensymed imports properly in metadata and if we encode them improperly, we can get erroneous name conflicts downstream.
    Gensymed imports are produced by the compiler, so we control their set, and can be sure that none of them needs being encoded for use from other crates.
    
    A workaround that fixes rust-lang#59243.
    Centril authored Mar 19, 2019
    Configuration menu
    Copy the full SHA
    080332b View commit details
    Browse the repository at this point in the history