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 16 pull requests #54457

Merged
merged 37 commits into from
Sep 22, 2018
Merged

Rollup of 16 pull requests #54457

merged 37 commits into from
Sep 22, 2018

Commits on Sep 16, 2018

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

Commits on Sep 18, 2018

  1. rustbuild: drop color handling

    Let cargo handle that for us
    
    Signed-off-by: Marc-Antoine Perennou <[email protected]>
    Keruspe committed Sep 18, 2018
    Configuration menu
    Copy the full SHA
    2a45057 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2018

  1. Configuration menu
    Copy the full SHA
    c996c4d View commit details
    Browse the repository at this point in the history
  2. Improve handling of type bounds in bit_set.rs.

    Currently, `BitSet` doesn't actually know its own domain size; it just
    knows how many words it contains. To improve things, this commit makes
    the following changes.
    
    - It changes `BitSet` and `SparseBitSet` to store their own domain size,
      and do more precise bounds and same-size checks with it. It also
      changes the signature of `BitSet::to_string()` (and puts it within
      `impl ToString`) now that the domain size need not be passed in from
      outside.
    
    - It uses `derive(RustcDecodable, RustcEncodable)` for `BitSet`. This
      required adding code to handle `PhantomData` in `libserialize`.
    
    - As a result, it removes the domain size from `HybridBitSet`, making a
      lot of that code nicer.
    
    - Both set_up_to() and clear_above() were overly general, working with
      arbitrary sizes when they are only needed for the domain size. The
      commit removes the former, degeneralizes the latter, and removes the
      (overly general) tests.
    
    - Changes `GrowableBitSet::grow()` to `ensure()`, fixing a bug where a
      (1-based) domain size was confused with a (0-based) element index.
    
    - Changes `BitMatrix` to store its row count, and do more precise bounds
      checks with it.
    
    - Changes `ty_params` in `select.rs` from a `BitSet` to a
      `GrowableBitSet` because it repeatedly failed the new, more precise
      bounds checks. (Changing the type was simpler than computing an
      accurate domain size.)
    
    - Various other minor improvements.
    nnethercote committed Sep 19, 2018
    Configuration menu
    Copy the full SHA
    99f05e8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9332167 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2018

  1. Configuration menu
    Copy the full SHA
    adc2c04 View commit details
    Browse the repository at this point in the history
  2. define copy_within on slices

    This is a safe wrapper around ptr::copy, for regions within a single
    slice. Previously, safe in-place copying was only available as a side
    effect of Vec::drain.
    oconnor663 committed Sep 20, 2018
    Configuration menu
    Copy the full SHA
    b3ffd33 View commit details
    Browse the repository at this point in the history
  3. add tests for copy_within

    oconnor663 committed Sep 20, 2018
    Configuration menu
    Copy the full SHA
    d0e59f5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ac8d8d7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b01e0e4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    06b1975 View commit details
    Browse the repository at this point in the history
  7. Use no_default_libraries for all NetBSD flavors

    The no_default_libraries was introduced in rust-lang#28578 because the
    NetBSD-based rumprun needed to disable the link flag.
    This moves the definition to be used by all NetBSD linker flavors to
    close rust-lang#49627.
    
    A different solution would be adding -lc but as there is no platform
    with explicit -lc, this approach is used.
    bgermann committed Sep 20, 2018
    Configuration menu
    Copy the full SHA
    36d562f View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2018

  1. Configuration menu
    Copy the full SHA
    d341b17 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9784d35 View commit details
    Browse the repository at this point in the history
  3. Remove incidental notes

    memoryruins committed Sep 21, 2018
    Configuration menu
    Copy the full SHA
    70da203 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7f9a259 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    06d577d View commit details
    Browse the repository at this point in the history
  6. Compress Liveness data some more.

    Profiling shows that the `(reader, writer, used)` triples used by
    liveness analysis almost always have invalid `reader` and `writer`
    fields. We can take advantage of this knowledge to use a compressed
    representation for them, falling back to a secondary table for the
    uncommon cases.
    
    This change reduces instruction counts on numerous benchmarks, the best
    by 16%. It also reduces max-rss on numerous benchmarks, the best by 38%.
    
    The patch also renames these triples from `Users` to `RWU`, because it's
    confusing having a type whose name is plural and then used within
    vectors whose names are also plural.
    nnethercote committed Sep 21, 2018
    Configuration menu
    Copy the full SHA
    b2f25e3 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    48f4605 View commit details
    Browse the repository at this point in the history
  8. Update .mailmap

    pvdrz authored Sep 21, 2018
    Configuration menu
    Copy the full SHA
    ad9bf17 View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2018

  1. Rollup merge of rust-lang#53652 - oconnor663:copy_in_place, r=alexcri…

    …chton
    
    define copy_within on slices
    
    This is a safe wrapper around `ptr::copy`, for regions within a single slice. Previously, safe in-place copying was only available as a side effect of `Vec::drain`.
    
    I've wanted this API a couple times in the past, and I figured I'd just whip up a PR to help discuss it. It's possible something like this exists elsewhere and I just missed it. It might also be a big enough addition to warrant an RFC, I'm not sure.
    pietroalbini authored Sep 22, 2018
    Configuration menu
    Copy the full SHA
    e6ee4e0 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#54261 - varkor:dyn-keyword-2018, r=petroche…

    …nkov
    
    Make `dyn` a keyword in the 2018 edition
    
    Proposed in rust-lang#44662 (comment).
    pietroalbini authored Sep 22, 2018
    Configuration menu
    Copy the full SHA
    822c511 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#54280 - japaric:no-cas-for-thumbv6, r=alexc…

    …richton
    
    remove (more) CAS API from Atomic* types where not natively supported
    
    closes rust-lang#54276
    
    In PR rust-lang#51953 I made the Atomic* types available on targets like thumbv6m and
    msp430 with the intention of *only* exposing the load and store API on those
    types -- the rest of the API doesn't work on those targets because the are no
    native instructions to implement CAS loops.
    
    Unfortunately, it seems I didn't properly cfg away all the CAS API on those
    targets, as evidenced in rust-lang#54276. This PR amends the issue by removing the rest
    of the CAS API.
    
    This is technically a breaking change because *libraries* that were using this
    API and were being compiled for e.g. thumbv6m-none-eabi will stop compiling.
    However, using those libraries (before this change) in programs (binaries) would
    lead to linking errors when compiled for e.g. thumbv6m so this change
    effectively shifts a linker error in binaries to a compiler error in libraries.
    
    On a side note: extending the Atomic API is a bit error prone because of these
    non-cas targets. Unless the author of the change is aware of these targets and
    properly uses `#[cfg(atomic = "cas")]` they could end up exposing new CAS API on
    these targets. I can't think of a test to check that an API is not present on
    some target, but we could extend the `tidy` tool to check that *all* newly added
    atomic API has the `#[cfg(atomic = "cas")]` attribute unless it's whitelisted in
    `tidy` then the author of the change would have to verify if the API can be used
    on non-cas targets.
    
    In any case, I'd like to plug this hole ASAP. We can revisit testing in a
    follow-up issue / PR.
    
    r? @alexcrichton
    cc @mvirkkunen
    pietroalbini authored Sep 22, 2018
    Configuration menu
    Copy the full SHA
    e3cc48a View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#54323 - Keruspe:rustc-color, r=Mark-Simulacrum

    rustbuild: drop color handling
    
    Let cargo handle that for us
    
    Fixes rust-lang#54322
    
    Needs a beta backport
    pietroalbini authored Sep 22, 2018
    Configuration menu
    Copy the full SHA
    e59df62 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#54350 - Munksgaard:support-edition-in-doc-t…

    …est, r=steveklabnik
    
    Support specifying edition in doc test
    
    Fixes rust-lang#52623
    
    r? @QuietMisdreavus
    pietroalbini authored Sep 22, 2018
    Configuration menu
    Copy the full SHA
    23636e3 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#54370 - nnethercote:better-domain_size, r=n…

    …ikomatsakis
    
    Improve handling of type bounds in `bit_set.rs`.
    
    Currently, `BitSet` doesn't actually know its own domain size; it just
    knows how many words it contains. We can make it better.
    pietroalbini authored Sep 22, 2018
    Configuration menu
    Copy the full SHA
    167a045 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#54371 - QuietMisdreavus:rustdoc-ui-testing,…

    … r=GuillaumeGomez
    
    add -Zui-testing to rustdoc
    
    Before we depend on the `rustdoc-ui` tests some more, let's make rustdoc act the same as the compiler when they're actually being executed.
    pietroalbini authored Sep 22, 2018
    Configuration menu
    Copy the full SHA
    7248b79 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#54374 - SergioBenitez:pub-multispan, r=alex…

    …crichton
    
    Make 'proc_macro::MultiSpan' public.
    
    Oversight from rust-lang#52896.
    pietroalbini authored Sep 22, 2018
    Configuration menu
    Copy the full SHA
    5d8a27e View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#54402 - bgermann:master, r=alexcrichton

    Use no_default_libraries for all NetBSD flavors
    
    The no_default_libraries was introduced in rust-lang#28578 because the
    NetBSD-based rumprun needed to disable the link flag.
    This moves the definition to be used by all NetBSD linker flavors to
    close rust-lang#49627.
    
    A different solution would be adding -lc but as there is no platform
    with explicit -lc, this approach is used.
    pietroalbini authored Sep 22, 2018
    Configuration menu
    Copy the full SHA
    8455a7f View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#54409 - estebank:remove-in, r=pnkfelix

    Detect `for _ in in bar {}` typo
    
    Fix rust-lang#36611, rust-lang#52964, without modifying the parsing of emplacement `in` to avoid further problems like rust-lang#50832.
    pietroalbini authored Sep 22, 2018
    Configuration menu
    Copy the full SHA
    1eee532 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#54412 - jcpst:replace_span_suggestion, r=es…

    …tebank
    
    add applicability to span_suggestion call
    
    Found another `span_suggestion` call. Issue rust-lang#50723
    
    r? @estebank
    pietroalbini authored Sep 22, 2018
    Configuration menu
    Copy the full SHA
    394d687 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#54413 - memoryruins:deref-error-twice, r=es…

    …tebank
    
    Add UI test for deref recursion limit printing twice
    
    Closes rust-lang#38940
    
    Does ``NOTE`` in the test need to be changed to ``HELP`` if its in the stderr?
    ``help: consider adding a `#![recursion_limit="20"]` attribute to your crate``
    
    It doesn't appear to complaining locally that the line isn't set to ``HELP`` in the test, and the guide says
     > HELP and SUGGESTION*
    > * Note: SUGGESTION must follow immediately after HELP.
    
    yet there's no concrete suggestion emitted.
    
    r? @estebank
    pietroalbini authored Sep 22, 2018
    Configuration menu
    Copy the full SHA
    0bf52b3 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#54415 - petrochenkov:norollback, r=estebank

    parser: Tweak function parameter parsing to avoid rollback on succesfull path
    
    Since rollback is not perfect and may e.g. leave non-fatal errors after it, we need to make sure compilation fails if it happens.
    So in particular case of `fn parse_arg_general` we need to parse the "good" `TYPE` first and only then rollback and recover erroneous `PAT: TYPE` if necessary.
    Found when working on rust-lang/rfcs#2544 (comment).
    
    r? @ghost
    pietroalbini authored Sep 22, 2018
    Configuration menu
    Copy the full SHA
    7c34cf7 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#54420 - nnethercote:PackedRWU-Vec, r=nikoma…

    …tsakis
    
    Compress `Liveness` data some more.
    
    Profiling shows that the `(reader, writer, used)` triples used by
    liveness analysis almost always have invalid `reader` and `writer`
    fields. We can take advantage of this knowledge to use a compressed
    representation for them, falling back to a secondary table for the
    uncommon cases.
    
    This change reduces instruction counts on numerous benchmarks, the best
    by 16%. It also reduces max-rss on numerous benchmarks, the best by 38%.
    
    The patch also renames these triples from `Users` to `RWU`, because it's
    confusing having a type whose name is plural and then used within
    vectors whose names are also plural.
    
    r? @nikomatsakis
    pietroalbini authored Sep 22, 2018
    Configuration menu
    Copy the full SHA
    317b212 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#54422 - ljedrz:simplify_first_last, r=Mark-…

    …Simulacrum
    
    Simplify slice's first(_mut) and last(_mut) with get
    
    This change makes these functions easier to read and interpret. I haven't detected any difference in performance locally.
    
    r? @Mark-Simulacrum
    pietroalbini authored Sep 22, 2018
    Configuration menu
    Copy the full SHA
    452d9d0 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#54446 - christianpoveda:patch-1, r=cramertj

    Unify christianpoveda's emails
    pietroalbini authored Sep 22, 2018
    Configuration menu
    Copy the full SHA
    48ec53c View commit details
    Browse the repository at this point in the history