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 19 pull requests #65570

Merged
merged 60 commits into from
Oct 19, 2019
Merged

Rollup of 19 pull requests #65570

merged 60 commits into from
Oct 19, 2019

Commits on Oct 2, 2019

  1. Always inline mem::{size_of,align_of} in debug builds

    Those two are const fn and do not have any arguments. Inlining
    helps reducing generated code size in debug builds.
    tesuji committed Oct 2, 2019
    Configuration menu
    Copy the full SHA
    a87b44d View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2019

  1. Disable Go and OCaml bindings when building LLVM

    Instead of instaling OCaml bindings in a location where installation
    will not fail, don't build them in the first place.
    tmiasko committed Oct 8, 2019
    Configuration menu
    Copy the full SHA
    3b0fd82 View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2019

  1. Collect occurrences of for mismatched braces diagnostic

    Change-Id: I20ba0b62308370ee961141fa1aefc4b9c9f0cb3a
    XiangQingW committed Oct 13, 2019
    Configuration menu
    Copy the full SHA
    e6ce3ef View commit details
    Browse the repository at this point in the history
  2. Collect occurrences of for mismatched braces diagnostic

    Change-Id: I20ba0b62308370ee961141fa1aefc4b9c9f0cb3a
    XiangQingW committed Oct 13, 2019
    Configuration menu
    Copy the full SHA
    888d0ba View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2019

  1. Collect occurrences of for mismatched braces diagnostic

    Change-Id: I20ba0b62308370ee961141fa1aefc4b9c9f0cb3a
    XiangQingW committed Oct 15, 2019
    Configuration menu
    Copy the full SHA
    fe819a0 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2019

  1. Use a BitSet in LexicalResolver::iterate_until_fixed_point().

    This wins 3% on `unicode_normalization`.
    nnethercote committed Oct 16, 2019
    Configuration menu
    Copy the full SHA
    70b136d View commit details
    Browse the repository at this point in the history
  2. Inline and remove iterate_until_fixed_point().

    The commit also removes the debug statement, because they annoyed me.
    This change wins another 1% on `unicode_normalization`, at least partly
    because it no longer needs to increment `iteration`.
    nnethercote committed Oct 16, 2019
    Configuration menu
    Copy the full SHA
    d51fee0 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2019

  1. Configuration menu
    Copy the full SHA
    42c0236 View commit details
    Browse the repository at this point in the history
  2. show up some extra info when t!() fails

    Guanqun Lu committed Oct 17, 2019
    Configuration menu
    Copy the full SHA
    c716be6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d1db077 View commit details
    Browse the repository at this point in the history
  4. Update ui tests

    GuillaumeGomez committed Oct 17, 2019
    Configuration menu
    Copy the full SHA
    21d9258 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    83e97c6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4cd9276 View commit details
    Browse the repository at this point in the history
  7. Update ui tests

    GuillaumeGomez committed Oct 17, 2019
    Configuration menu
    Copy the full SHA
    f647c06 View commit details
    Browse the repository at this point in the history
  8. Plugins deprecation: don’t suggest simply removing the attribute

    Building Servo with a recent Nightly produces:
    
    ```rust
    warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See rust-lang#29597
      --> components/script/lib.rs:14:1
       |
    14 | #![plugin(script_plugins)]
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
       |
       = note: `#[warn(deprecated)]` on by default
    ```
    
    First, linking to rust-lang#29597 is not ideal
    since there is pretty much no discussion there of the deprecation
    and what can be used instead.
    This PR changes the link to the deprecation PR which does have more discussion.
    
    Second, the “remove this attribute” suggestion is rather unhelpful.
    Just because a feature is deprecated doesn’t mean that simply removing its use
    without a replacement is acceptable.
    
    In the case of custom lint, there is no replacement available.
    Prefixing a message with “help:” when telling users that they’re screwed
    honestly feels disrespectful.
    
    This PR also changes the message to be more factual.
    SimonSapin committed Oct 17, 2019
    Configuration menu
    Copy the full SHA
    71b0049 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    a4d9492 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    5fe88ab View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    ad6ce46 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    4e6efe4 View commit details
    Browse the repository at this point in the history
  13. Update triagebot.toml

    Co-Authored-By: Mark Rousskov <[email protected]>
    nikomatsakis and Mark-Simulacrum authored Oct 17, 2019
    Configuration menu
    Copy the full SHA
    5487994 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    c0b7e76 View commit details
    Browse the repository at this point in the history
  15. doc: make BitSet intro more short

    Also, add a link to the growable type
    tshepang committed Oct 17, 2019
    Configuration menu
    Copy the full SHA
    c9b27d1 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2019

  1. Configuration menu
    Copy the full SHA
    cd9e444 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5de9cb0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e069e9c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    591cc9a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bb7d6d1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e3e9951 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0fc063f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    39c9ed3 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    2b2e35b View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    4f2a110 View commit details
    Browse the repository at this point in the history
  11. Setup a different visit place set of methods for mutable and immutabl…

    …e visitors
    
    In particular, use a blank visit_place for mutable visitor to be sure,
    non modified visitors are not trying to mutating place.
    spastorino committed Oct 18, 2019
    Configuration menu
    Copy the full SHA
    7fa3425 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    d53fc9c View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    d0eaf60 View commit details
    Browse the repository at this point in the history
  14. Make TokenStream::from_iter less general and more efficient.

    The current code has this impl:
    ```
    impl<T: Into<TokenStream>> iter::FromIterator<T> for TokenStream
    ```
    If given an `IntoIterator<Item = TokenTree>`, it will convert each individual
    `TokenTree` to a `TokenStream` (at the cost of two allocations: a `Vec`
    and an `Lrc`). It will then merge those `TokenStream`s into a single
    `TokenStream`. This is inefficient.
    
    This commit changes the impl to this less general one:
    ```
    impl iter::FromIterator<TokenTree> for TokenStream
    ```
    It collects the `TokenTree`s into a single `Vec` first and then converts that
    to a `TokenStream` by wrapping it in a single `Lrc`. The previous generality
    was unnecessary; no other code needs changing.
    
    This change speeds up several benchmarks by up to 4%.
    nnethercote committed Oct 18, 2019
    Configuration menu
    Copy the full SHA
    a6eef29 View commit details
    Browse the repository at this point in the history
  15. Change Lit::tokens() to Lit::token_tree().

    Because most of the call sites have an easier time working with a
    `TokenTree` instead of a `TokenStream`.
    nnethercote committed Oct 18, 2019
    Configuration menu
    Copy the full SHA
    212ae58 View commit details
    Browse the repository at this point in the history
  16. Change MetaItem::tokens() to MetaItem::token_trees_and_joints().

    Likewise for `NestedMetaItem::tokens()`. Also, add
    `MetaItemKind::token_trees_and_joints()`, which `MetaItemKind::tokens()`
    now calls.
    
    This avoids some unnecessary `TokenTree` to `TokenStream` conversions,
    and removes the need for the clumsy
    `TokenStream::append_to_tree_and_joint_vec()`.
    nnethercote committed Oct 18, 2019
    Configuration menu
    Copy the full SHA
    e4ec4a6 View commit details
    Browse the repository at this point in the history
  17. Fix left/right shift typo in wrapping rotate docs

    This makes the note similar to the one found on rotate functions for
    primitive types like i32/u32.
    t-rapp committed Oct 18, 2019
    Configuration menu
    Copy the full SHA
    769e75b View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    9617014 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    4834996 View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#65016 - lzutao:inline-mem-constfn, r=oli-obk

    Always inline `mem::{size_of,align_of}` in debug builds
    
    Those two are const fn and do not have any arguments. Inlining
    helps reducing generated code size in debug builds.
    
    See also rust-lang#64996.
    tmandry authored Oct 18, 2019
    Configuration menu
    Copy the full SHA
    7167a59 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#65197 - spastorino:place-mut-visitor-adjust…

    …s2, r=oli-obk
    
    Prepare `MutVisitor`s to handle interned projections
    
    The following are all the files where mir's `MutVisitor` is implemented. The `-` there stands for no changes, `visit_place` wasn't making any change on `Place`s. `x` stands for this file was changed to make `visit_place` do whatever it was doing with the base but avoid modifying the projection, instead just create a new one and assign to it.
    
    ```
    [-] src/librustc_mir/transform/no_landing_pads.rs
    [x] src/librustc_mir/transform/promote_consts.rs
    [x] src/librustc_mir/transform/generator.rs
    [x] src/librustc_mir/transform/erase_regions.rs
    [-] src/librustc_mir/transform/instcombine.rs
    [x] src/librustc_mir/transform/inline.rs
    [x] src/librustc_mir/transform/simplify.rs
    [x] src/librustc_mir/util/def_use.rs
    [-] src/librustc_mir/transform/const_prop.rs
    [-] src/librustc_mir/transform/cleanup_post_borrowck.rs
    [x] src/librustc_mir/borrow_check/nll/renumber.rs
    [-] src/librustc_mir/transform/copy_prop.rs
    ```
    
    There is some code repetition, just created the PR so we can start discussing it.
    
    /cc @oli-obk @nikomatsakis
    tmandry authored Oct 18, 2019
    Configuration menu
    Copy the full SHA
    d2bea3c View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#65201 - tmiasko:no-bindings, r=rkruppe

    Disable Go and OCaml bindings when building LLVM
    
    Instead of instaling OCaml bindings in a location where installation
    will not fail, don't build them in the first place.
    tmandry authored Oct 18, 2019
    Configuration menu
    Copy the full SHA
    fdef437 View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#65334 - GuillaumeGomez:long-err-explanation…

    …-E0575, r=kinnison
    
    Add long error explanation for E0575
    
    Part of rust-lang#61137.
    tmandry authored Oct 18, 2019
    Configuration menu
    Copy the full SHA
    bb53fed View commit details
    Browse the repository at this point in the history
  24. Rollup merge of rust-lang#65364 - XiangQingW:master, r=estebank

    Collect occurrences of empty blocks for mismatched braces diagnostic
    
    Fix rust-lang#63904
    tmandry authored Oct 18, 2019
    Configuration menu
    Copy the full SHA
    8f8a23f View commit details
    Browse the repository at this point in the history
  25. Rollup merge of rust-lang#65455 - nnethercote:avoid-unnecessary-Token…

    …Tree-to-TokenStream-conversions, r=petrochenkov
    
    Avoid unnecessary `TokenTree` to `TokenStream` conversions
    
    A `TokenStream` contains any number of `TokenTrees`. Therefore, a single `TokenTree` can be promoted to a `TokenStream`. But doing so costs two allocations: one for the single-element `Vec`, and one for the `Lrc`. (An `IsJoint` value also must be added; the default is `NonJoint`.)
    
    The current code converts `TokenTree`s to `TokenStream`s unnecessarily in a few places. This PR removes some of these unnecessary conversions, both simplifying the code and speeding it up.
    
    r? @petrochenkov
    tmandry authored Oct 18, 2019
    Configuration menu
    Copy the full SHA
    f5f5c9e View commit details
    Browse the repository at this point in the history
  26. Rollup merge of rust-lang#65472 - Zoxc:sharded-dep-graph-2, r=nikomat…

    …sakis
    
    Use a sharded dep node to dep node index map
    
    Split out from rust-lang#61845 and based on rust-lang#63756.
    
    r? @nikomatsakis
    tmandry authored Oct 18, 2019
    Configuration menu
    Copy the full SHA
    05ab63e View commit details
    Browse the repository at this point in the history
  27. Rollup merge of rust-lang#65480 - nnethercote:rm-iterate_until_fixed_…

    …size, r=nikomatsakis
    
    Speed up `LexicalResolve::expansion()`
    
    A couple of improvements that speed up `unicode_normalization` by about 4%. The first commit was enabled by the improvements to `BitSet` iteration in rust-lang#65425.
    
    r? @nikomatsakis
    tmandry authored Oct 18, 2019
    Configuration menu
    Copy the full SHA
    c6bb960 View commit details
    Browse the repository at this point in the history
  28. Rollup merge of rust-lang#65493 - GuillaumeGomez:long-err-explanation…

    …-E0584, r=kinnison
    
    Add long error explanation for E0584
    
    Part of rust-lang#61137.
    
    r? @kinnison
    tmandry authored Oct 18, 2019
    Configuration menu
    Copy the full SHA
    e27e39b View commit details
    Browse the repository at this point in the history
  29. Rollup merge of rust-lang#65496 - tspiteri:euc-div-panic, r=KodrAus

    properly document panics in div_euclid and rem_euclid
    
    For signed numbers, document that `div_euclid` and `rem_euclid` panic not just when `rhs` is 0, but also when the division overflows.
    
    For unsigned numbers, document that `div_euclid` and `rem_euclid` panic when `rhs` is 0.
    tmandry authored Oct 18, 2019
    Configuration menu
    Copy the full SHA
    ea5a184 View commit details
    Browse the repository at this point in the history
  30. Rollup merge of rust-lang#65498 - SimonSapin:plugin-help, r=Centril

    Plugins deprecation: don’t suggest simply removing the attribute
    
    Building Servo with a recent Nightly produces:
    
    ```rust
    warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See rust-lang#29597
      --> components/script/lib.rs:14:1
       |
    14 | #![plugin(script_plugins)]
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
       |
       = note: `#[warn(deprecated)]` on by default
    ```
    
    First, linking to rust-lang#29597 is not ideal since there is pretty much no discussion there of the deprecation and what can be used instead. This PR changes the link to the deprecation PR which does have more discussion.
    
    Second, the “remove this attribute” suggestion is rather unhelpful. Just because a feature is deprecated doesn’t mean that simply removing its use without a replacement is acceptable.
    
    In the case of custom lint, there is no replacement available. Prefixing a message with “help:” when telling users that they’re screwed honestly feels disrespectful.
    
    This PR also changes the message to be more factual.
    tmandry authored Oct 18, 2019
    Configuration menu
    Copy the full SHA
    64bf0ca View commit details
    Browse the repository at this point in the history
  31. Rollup merge of rust-lang#65508 - rust-lang:llvm-icebreakers-ping-1, …

    …r=simulacrum
    
    add option to ping llvm ice-breakers to triagebot
    tmandry authored Oct 18, 2019
    Configuration menu
    Copy the full SHA
    9fc8d8e View commit details
    Browse the repository at this point in the history
  32. Rollup merge of rust-lang#65511 - Xanewok:sa-nest-in-impls, r=pnkfelix

    save-analysis: Nest tables when processing impl block definitions
    
    Similar to rust-lang#65353 (which this PR should've been a part of), however in this case we didn't previously nest the tables when processing trait paths in impl block declarations.
    
    Closes rust-lang#65411
    tmandry authored Oct 18, 2019
    Configuration menu
    Copy the full SHA
    156a55e View commit details
    Browse the repository at this point in the history
  33. Rollup merge of rust-lang#65513 - RalfJung:fmt, r=Mark-Simulacrum

    reorder fmt docs for more clarity
    
    I adjusted these docs in rust-lang#65332 but wasn't happy with the result when seeing it in rustdoc. So this reorders the subsections in the "Formatting Parameters" section to be more logical (subsections that reference `width` come after the `width` subsection) and they also all have examples now.
    tmandry authored Oct 18, 2019
    Configuration menu
    Copy the full SHA
    5948961 View commit details
    Browse the repository at this point in the history
  34. Rollup merge of rust-lang#65532 - tshepang:shorten-intro, r=Dylan-DPC

    doc: make BitSet intro more short
    
    Also, add a link to the growable type
    tmandry authored Oct 18, 2019
    Configuration menu
    Copy the full SHA
    138ff4a View commit details
    Browse the repository at this point in the history
  35. Rollup merge of rust-lang#65535 - eddyb:sliced-predicates, r=nikomats…

    …akis
    
    rustc: arena-allocate the slice in `ty::GenericsPredicate`, not the whole struct.
    
    While rebasing rust-lang#59789 I noticed we can do this now. However, it doesn't help much without changing `inferred_outlives_of` to the same type, which I might try next.
    tmandry authored Oct 18, 2019
    Configuration menu
    Copy the full SHA
    bc85061 View commit details
    Browse the repository at this point in the history
  36. Rollup merge of rust-lang#65540 - guanqun:extend-t-macro, r=nikomatsakis

    show up some extra info when t!() fails
    tmandry authored Oct 18, 2019
    Configuration menu
    Copy the full SHA
    37cbdf3 View commit details
    Browse the repository at this point in the history
  37. Rollup merge of rust-lang#65549 - t-rapp:tr-wrapping-rotate-docs, r=j…

    …onas-schievink
    
    Fix left/right shift typo in wrapping rotate docs
    
    This makes the note similar to the one found on rotate functions for primitive types like i32/u32.
    tmandry authored Oct 18, 2019
    Configuration menu
    Copy the full SHA
    edc42a9 View commit details
    Browse the repository at this point in the history
  38. Rollup merge of rust-lang#65552 - JohnTitor:use-bitwise-not, r=Dylan-DPC

    Clarify diagnostics when using `~` as a unary op
    
    It seems we prefer `bitwise not` to `bitwise negation`.
    Fixes rust-lang#57239
    
    r? @estebank
    tmandry authored Oct 18, 2019
    Configuration menu
    Copy the full SHA
    3850408 View commit details
    Browse the repository at this point in the history