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 #52344

Closed
wants to merge 50 commits into from

Commits on Jul 1, 2018

  1. Provide llvm-strip in llvm-tools component

    Shipping this tool gives people reliable way to reduce the generated executable size.
    
    I'm not sure if this strip tool is available from the llvm version current rust is built on. But let's take a look. @japaric
    crlf0710 authored Jul 1, 2018
    Configuration menu
    Copy the full SHA
    de2ecea View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2018

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

Commits on Jul 8, 2018

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

Commits on Jul 9, 2018

  1. Add a basic test to Option::replace

    Clément RENAULT committed Jul 9, 2018
    Configuration menu
    Copy the full SHA
    af87a35 View commit details
    Browse the repository at this point in the history
  2. Fix the documentation of Option::replace

    Clément RENAULT committed Jul 9, 2018
    Configuration menu
    Copy the full SHA
    c8f0e6f View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2018

  1. Add UI tests for diagnostics comparing types

    They highlight how types are displayed in those cases, and will show
    how the current output is altered by the next patch.
    glandium committed Jul 12, 2018
    Configuration menu
    Copy the full SHA
    5336df7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b5c2b79 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0d7b2e6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f29ac5a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0878453 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    21d9ac1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5058af7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e93de95 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4c340a2 View commit details
    Browse the repository at this point in the history
  10. Resolve FIXME(rust-lang#27942)

    ljedrz committed Jul 12, 2018
    Configuration menu
    Copy the full SHA
    72f096b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    9ead0d8 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    4f4e91a View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2018

  1. dead-code lint: say "constructed", "called" for structs, functions

    Respectively.
    
    This is a sequel to November 2017's rust-lang#46103 / 1a9dc2e. It had been
    reported (more than once—at least rust-lang#19140, rust-lang#44083, and rust-lang#44565) that the
    "never used" language was confusing for enum variants that were "used"
    as match patterns, so the wording was changed to say never "constructed"
    specifically for enum variants. More recently, the same issue was raised
    for structs (rust-lang#52325). It seems consistent to say "constructed" here,
    too, for the same reasons.
    
    While we're here, we can also use more specific word "called" for unused
    functions and methods. (We declined to do this in rust-lang#46103, but the
    rationale given in the commit message doesn't actually make sense.)
    
    This resolves rust-lang#52325.
    zackmdavis committed Jul 13, 2018
    Configuration menu
    Copy the full SHA
    8cc4fd6 View commit details
    Browse the repository at this point in the history
  2. Add ref mut suggestion test

    ashtneoi committed Jul 13, 2018
    Configuration menu
    Copy the full SHA
    f8eb9a6 View commit details
    Browse the repository at this point in the history
  3. Reimplement some "add mut" suggestions under NLL

    Specifically, `&self` -> `&mut self` and explicit `ref` -> `ref mut`.
    Implicit `ref` isn't handled yet and causes an ICE.
    ashtneoi committed Jul 13, 2018
    Configuration menu
    Copy the full SHA
    52d6ae8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6fd1a9f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b8b04f6 View commit details
    Browse the repository at this point in the history
  6. Simplify match expression

    ashtneoi committed Jul 13, 2018
    Configuration menu
    Copy the full SHA
    73a979a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    77d5f39 View commit details
    Browse the repository at this point in the history
  8. fix wrong replacing

    csmoe authored and ashtneoi committed Jul 13, 2018
    Configuration menu
    Copy the full SHA
    246caea View commit details
    Browse the repository at this point in the history
  9. update test

    csmoe authored and ashtneoi committed Jul 13, 2018
    Configuration menu
    Copy the full SHA
    4e5d228 View commit details
    Browse the repository at this point in the history
  10. lint with ref_span

    csmoe authored and ashtneoi committed Jul 13, 2018
    Configuration menu
    Copy the full SHA
    1662daa View commit details
    Browse the repository at this point in the history
  11. replace ref

    csmoe authored and ashtneoi committed Jul 13, 2018
    Configuration menu
    Copy the full SHA
    af5edc3 View commit details
    Browse the repository at this point in the history
  12. update test

    csmoe authored and ashtneoi committed Jul 13, 2018
    Configuration menu
    Copy the full SHA
    212da12 View commit details
    Browse the repository at this point in the history
  13. add nll stderr

    csmoe authored and ashtneoi committed Jul 13, 2018
    Configuration menu
    Copy the full SHA
    8932684 View commit details
    Browse the repository at this point in the history
  14. span_suggestion

    csmoe authored and ashtneoi committed Jul 13, 2018
    Configuration menu
    Copy the full SHA
    7a70140 View commit details
    Browse the repository at this point in the history
  15. Bless tests and update ERROR

    ashtneoi committed Jul 13, 2018
    Configuration menu
    Copy the full SHA
    323df7b View commit details
    Browse the repository at this point in the history
  16. Factor out suggest_ref_mut; use it in rustc_borrowck

    Also teach rustc_borrowck not to show useless help messages like
    "use a mutable reference instead: `x`".
    ashtneoi committed Jul 13, 2018
    Configuration menu
    Copy the full SHA
    531a68c View commit details
    Browse the repository at this point in the history
  17. Bless one more test

    ashtneoi committed Jul 13, 2018
    Configuration menu
    Copy the full SHA
    1ed8619 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#51962 - crlf0710:patch-2, r=alexcrichton

    Provide llvm-strip in llvm-tools component
    
    Shipping this tool gives people reliable way to reduce the generated executable size.
    
    I'm not sure if this strip tool is available from the llvm version current rust is built on. But let's take a look. @japaric
    Mark-Simulacrum authored Jul 13, 2018
    Configuration menu
    Copy the full SHA
    030d60c View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#52003 - Kerollmops:option-replace, r=Kimundi

    Implement `Option::replace` in the core library
    
    Here is the implementation of the `Option::replace` method. The first step of [the tracking issue rust-lang#51998](rust-lang#51998).
    Mark-Simulacrum authored Jul 13, 2018
    Configuration menu
    Copy the full SHA
    20176fe View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#52156 - zajlerke:update-deprecation-notice,…

    … r=Kimundi
    
    Update std::ascii::ASCIIExt deprecation notes
    
    Fixes rust-lang#52085
    Mark-Simulacrum authored Jul 13, 2018
    Configuration menu
    Copy the full SHA
    b16bad6 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#52242 - ashtneoi:suggest-ref-mut, r=pnkfelix

    NLL: Suggest `ref mut` and `&mut self`
    
    Fixes rust-lang#51244. Supersedes rust-lang#51249, I think.
    
    Under the old lexical lifetimes, the compiler provided helpful suggestions about adding `mut` when you tried to mutate a variable bound as `&self` or (explicit) `ref`. NLL doesn't have those suggestions yet. This pull request adds them.
    
    I didn't bother making the help text exactly the same as without NLL, but I can if that's important.
    
    (Originally this was supposed to be part of rust-lang#51612, but I got bogged down trying to fit everything in one PR.)
    Mark-Simulacrum authored Jul 13, 2018
    Configuration menu
    Copy the full SHA
    7b75c00 View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#52244 - glandium:issue52097, r=estebank

    Don't display default generic parameters in diagnostics that compare types
    
    In errors like:
    ```
       expected type: `RawVec<foo, Global>`
          found type: `foo`
    ```
    
    `RawVec` being defined as `RawVec<T, A: Alloc = Global>`, the error is better written as
    ```
       expected type: `RawVec<foo>`
          found type: `foo`
    ```
    
    In fact, that is already what happens when `foo` is not an ADT, because in that case, the diagnostic handler doesn't try to highlight something, and just uses the `Display` trait instead of its own logic.
    
    e.g.
    ```
       expected type: `RawVec<usize>`
          found type: `usize`
    ```
    Mark-Simulacrum authored Jul 13, 2018
    Configuration menu
    Copy the full SHA
    24738ba View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#52290 - ljedrz:dyn_librustc_save_analysis, …

    …r=cramertj
    
    Deny bare trait objects in src/librustc_save_analysis
    
    Enforce `#![deny(bare_trait_objects)]` in `src/librustc_save_analysis`.
    Mark-Simulacrum authored Jul 13, 2018
    Configuration menu
    Copy the full SHA
    464ed4d View commit details
    Browse the repository at this point in the history
  24. Rollup merge of rust-lang#52293 - ljedrz:dyn_librustc_typeck, r=estebank

    Deny bare trait objects in librustc_typeck
    
    Enforce `#![deny(bare_trait_objects)]` in `src/librustc_typeck`.
    Mark-Simulacrum authored Jul 13, 2018
    Configuration menu
    Copy the full SHA
    76eed24 View commit details
    Browse the repository at this point in the history
  25. Rollup merge of rust-lang#52299 - ljedrz:dyn_libserialize, r=cramertj

    Deny bare trait objects in src/libserialize
    
    Enforce `#![deny(bare_trait_objects)]` in `src/libserialize`.
    Mark-Simulacrum authored Jul 13, 2018
    Configuration menu
    Copy the full SHA
    90a21a1 View commit details
    Browse the repository at this point in the history
  26. Rollup merge of rust-lang#52300 - ljedrz:dyn_target_test, r=Mark-Simu…

    …lacrum
    
    Deny bare trait objects in librustc_target and libtest
    
    Enforce `#![deny(bare_trait_objects)]` in `src/librustc_target` and `src/libtest`.
    Mark-Simulacrum authored Jul 13, 2018
    Configuration menu
    Copy the full SHA
    6167181 View commit details
    Browse the repository at this point in the history
  27. Rollup merge of rust-lang#52302 - ljedrz:dyn_futureproofing, r=cramertj

    Deny bare trait objects in the rest of rust
    
    Add `#![deny(bare_trait_objects)]` to all the modules not covered before (those did not require code changes) that I consider applicable (I left out shims) in order to futureproof them.
    Mark-Simulacrum authored Jul 13, 2018
    Configuration menu
    Copy the full SHA
    cf5eebf View commit details
    Browse the repository at this point in the history
  28. Rollup merge of rust-lang#52310 - Mark-Simulacrum:release-notes-backp…

    …ort-from-stable, r=pietroalbini
    
    Backport 1.27.1 release notes to master
    
    r? @pietroalbini
    Mark-Simulacrum authored Jul 13, 2018
    Configuration menu
    Copy the full SHA
    fed8105 View commit details
    Browse the repository at this point in the history
  29. Rollup merge of rust-lang#52314 - varkor:issue-52023, r=oli-obk

    Fix ICE when using a pointer cast as array size
    
    Fixes rust-lang#52023. I'm not sure if the comment rust-lang#52023 (comment) suggested we also emit `E0080`, but just emitting `E0018` seems reasonable for now.
    
    r? @oli-obk
    Mark-Simulacrum authored Jul 13, 2018
    Configuration menu
    Copy the full SHA
    102ed77 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    82da5ce View commit details
    Browse the repository at this point in the history
  31. Rollup merge of rust-lang#52316 - seanmonstar:waker-unsafety, r=cramertj

    task: remove wrong comments about non-existent LocalWake trait
    
    ~~A `LocalWaker` is specifically `!Send `, and the unsafety comment around
    `LocalWaker::new` only specifies that it be safe to call `wake_local`.
    One could then accidentally promote a `LocalWaker` into a `Waker`, which
    is universally `Send`, simply via `Waker::from(local_waker)`. A
    `LocalWaker` the was built expecting to not be `Send`, such as using
    `Rc`, could be sent to other threads safely.~~
    
    ~~Separately, though somewhat related, `Context` holds a `&LocalWaker`
    internally, and exposes a `waker() -> &Waker` method. This simply
    transmutes the `&LocalWaker` to `&Waker`, which would be unsound, except
    that you can't "send" a `&Waker`, you'd need to clone it first. Since
    `UnsafeWake::clone_raw` requires that it return a `Waker`, the transmute
    is not unsound. The transmuted `LocalWaker` will be promoted to a
    `Waker` correctly.~~
    
    ~~That would mean that if `UnsafeWake::clone_raw` were to be changed, such
    as returning `Self` instead of `Waker`, this would no longer be sound.
    Thus, this also adds a comment to `clone_raw` to remember this.~~
    
    r? @cramertj
    Mark-Simulacrum authored Jul 13, 2018
    Configuration menu
    Copy the full SHA
    0bba879 View commit details
    Browse the repository at this point in the history
  32. Rollup merge of rust-lang#52322 - varkor:llvm-7-rebuild-trigger, r=al…

    …excrichton
    
    Update llvm-rebuild-trigger in light of LLVM 7 upgrade
    
    Not triggering a LLVM rebuild [since the LLVM 7 upgrade](rust-lang#51966 (comment)) causes builds of rustc to fail.
    
    r? @alexcrichton
    Mark-Simulacrum authored Jul 13, 2018
    Configuration menu
    Copy the full SHA
    a1b9b6a View commit details
    Browse the repository at this point in the history
  33. Rollup merge of rust-lang#52332 - zackmdavis:dead_code_lint_should_sa…

    …y_2_electric_boogaloo, r=pnkfelix
    
    dead-code lint: say "constructed", "called" for structs, functions
    
    Respectively.
    
    This is a sequel to November 2017's rust-lang#46103 / 1a9dc2e. It had been
    reported (more than once—at least rust-lang#19140, rust-lang#44083, and rust-lang#44565) that the
    "never used" language was confusing for enum variants that were "used"
    as match patterns, so the wording was changed to say never "constructed"
    specifically for enum variants. More recently, the same issue was raised
    for structs (rust-lang#52325). It seems consistent to say "constructed" here,
    too, for the same reasons.
    
    While we're here, we can also use more specific word "called" for unused
    functions and methods. (We declined to do this in rust-lang#46103, but the
    rationale given in the commit message doesn't actually make sense.)
    
    This resolves rust-lang#52325.
    Mark-Simulacrum authored Jul 13, 2018
    Configuration menu
    Copy the full SHA
    9dff778 View commit details
    Browse the repository at this point in the history