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 6 pull requests #110463

Closed
wants to merge 34 commits into from

Commits on Apr 14, 2023

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

Commits on Apr 16, 2023

  1. Set git info env variables when building tools

    This should fix issue rust-lang#107094.
    duckymirror committed Apr 16, 2023
    Configuration menu
    Copy the full SHA
    28d27fd View commit details
    Browse the repository at this point in the history
  2. Add needs-git-hash header to compiletest

    This header can be used for tests which check the output of `--version --verbose` commands.
    duckymirror committed Apr 16, 2023
    Configuration menu
    Copy the full SHA
    d535af3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    135e620 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    550df4d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bfa8798 View commit details
    Browse the repository at this point in the history
  6. Don't use serde_json to serialize a simple JSON object

    This avoids `rustc_data_structures` depending on `serde_json` which
    allows it to be compiled much earlier, unlocking most of rustc.
    Noratrieb committed Apr 16, 2023
    Configuration menu
    Copy the full SHA
    7859a8e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c9a6e41 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    abc0660 View commit details
    Browse the repository at this point in the history
  9. Add rustc_fluent_macro to decouple fluent from rustc_macros

    Fluent, with all the icu4x it brings in, takes quite some time to
    compile. `fluent_messages!` is only needed in further downstream rustc
    crates, but is blocking more upstream crates like `rustc_index`. By
    splitting it out, we allow `rustc_macros` to be compiled earlier, which
    speeds up `x check compiler` by about 5 seconds (and even more after the
    needless dependency on `serde_json` is removed from
    `rustc_data_structures`).
    Noratrieb committed Apr 16, 2023
    Configuration menu
    Copy the full SHA
    ff04b6a View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    4b981c2 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2023

  1. Configuration menu
    Copy the full SHA
    a091fd2 View commit details
    Browse the repository at this point in the history
  2. Add code comment to remind contributors to update rustdoc book if the…

    …y update the disambiguators list
    GuillaumeGomez committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    1531c95 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6978147 View commit details
    Browse the repository at this point in the history
  4. Drop uplifted clippy::drop_ref

    Urgau committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    b33d6ea View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    78ed1ef View commit details
    Browse the repository at this point in the history
  6. Drop uplifted clippy::drop_copy

    Urgau committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    e3d2a0a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b91a4e9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    bc07f57 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1e4f98a View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d218a02 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    725537c View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    c93226d View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    830fa9e View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    6de2a74 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    af46d60 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    0a763c9 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#109507 - Amanieu:panic-oom-payload, r=david…

    …twco
    
    Report allocation errors as panics
    
    OOM is now reported as a panic but with a custom payload type (`AllocErrorPanicPayload`) which holds the layout that was passed to `handle_alloc_error`.
    
    This should be review one commit at a time:
    - The first commit adds `AllocErrorPanicPayload` and changes allocation errors to always be reported as panics.
    - The second commit removes `#[alloc_error_handler]` and the `alloc_error_hook` API.
    
    ACP: rust-lang/libs-team#192
    
    Closes rust-lang#51540
    Closes rust-lang#51245
    matthiaskrgr authored Apr 17, 2023
    Configuration menu
    Copy the full SHA
    5cd90ee View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#109732 - Urgau:uplift_drop_forget_ref_lints…

    …, r=davidtwco
    
    Uplift `clippy::{drop,forget}_{ref,copy}` lints
    
    This PR aims at uplifting the `clippy::drop_ref`, `clippy::drop_copy`, `clippy::forget_ref` and `clippy::forget_copy` lints.
    
    Those lints are/were declared in the correctness category of clippy because they lint on useless and most probably is not what the developer wanted.
    
    ## `drop_ref` and `forget_ref`
    
    The `drop_ref` and `forget_ref` lint checks for calls to `std::mem::drop` or `std::mem::forget` with a reference instead of an owned value.
    
    ### Example
    
    ```rust
    let mut lock_guard = mutex.lock();
    std::mem::drop(&lock_guard) // Should have been drop(lock_guard), mutex
    // still locked
    operation_that_requires_mutex_to_be_unlocked();
    ```
    
    ### Explanation
    
    Calling `drop` or `forget` on a reference will only drop the reference itself, which is a no-op. It will not call the `drop` or `forget` method on the underlying referenced value, which is likely what was intended.
    
    ## `drop_copy` and `forget_copy`
    
    The `drop_copy` and `forget_copy` lint checks for calls to `std::mem::forget` or `std::mem::drop` with a value that derives the Copy trait.
    
    ### Example
    
    ```rust
    let x: i32 = 42; // i32 implements Copy
    std::mem::forget(x) // A copy of x is passed to the function, leaving the
                        // original unaffected
    ```
    
    ### Explanation
    
    Calling `std::mem::forget` [does nothing for types that implement Copy](https://doc.rust-lang.org/std/mem/fn.drop.html) since the value will be copied and moved into the function on invocation.
    
    -----
    
    Followed the instructions for uplift a clippy describe here: rust-lang#99696 (review)
    
    cc `@m-ou-se` (as T-libs-api leader because the uplifting was discussed in a recent meeting)
    matthiaskrgr authored Apr 17, 2023
    Configuration menu
    Copy the full SHA
    7f92747 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#109981 - duckymirror:issue-107094, r=albert…

    …larsan68
    
    Set commit information environment variables when building tools
    
    This fixes rust-lang#107094.
    ~I'm trying to add a regression test for this issue.~
    **Update**: I've added a test and a new test header `needs-git-hash` which makes sure it doesn't run when commit hashes are ignored (`bootstrap`'s `ignore-git` option).
    matthiaskrgr authored Apr 17, 2023
    Configuration menu
    Copy the full SHA
    578a8d8 View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#110348 - GuillaumeGomez:disambiguators-suff…

    …ixes-rustdoc-book, r=Manishearth
    
    Add list of supported disambiguators and suffixes for intra-doc links in the rustdoc book
    
    This information is otherwise only provided in case an error occurs, which isn't great.
    
    r? `@notriddle`
    matthiaskrgr authored Apr 17, 2023
    Configuration menu
    Copy the full SHA
    cfe6c94 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#110407 - Nilstrieb:fluent-macro, r=davidtwco

    Add `rustc_fluent_macro` to decouple fluent from `rustc_macros`
    
    Fluent, with all the icu4x it brings in, takes quite some time to compile. `fluent_messages!` is only needed in further downstream rustc crates, but is blocking more upstream crates like `rustc_index`. By splitting it out, we allow `rustc_macros` to be compiled earlier, which speeds up `x check compiler` by about 5 seconds (and even more after the needless dependency on `serde_json` is removed from `rustc_data_structures`).
    matthiaskrgr authored Apr 17, 2023
    Configuration menu
    Copy the full SHA
    92888be View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#110409 - Nilstrieb:some-manual-javascript-o…

    …bject-notationing, r=fee1-dead
    
    Don't use `serde_json` to serialize a simple JSON object
    
    This avoids `rustc_data_structures` depending on `serde_json` which allows it to be compiled much earlier, unlocking most of rustc.
    
    This used to not matter, but after rust-lang#110407 we're not blocked on fluent anymore, which means that it's now a blocking edge.
    ![image](https://user-images.githubusercontent.com/48135649/232313178-e0150420-3020-4eb6-98d3-fe5294a8f947.png)
    
    This saves a few more seconds.
    
    cc ``@Zoxc`` who added it recently
    matthiaskrgr authored Apr 17, 2023
    Configuration menu
    Copy the full SHA
    6595372 View commit details
    Browse the repository at this point in the history