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 9 pull requests #129933

Closed
wants to merge 26 commits into from

Commits on Jul 13, 2024

  1. Update Tests

    veera-sivarajan committed Jul 13, 2024
    Configuration menu
    Copy the full SHA
    102997a View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2024

  1. Add Tests

    veera-sivarajan committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    764675e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f003e92 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2024

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

Commits on Aug 26, 2024

  1. Document the broken C ABI of wasm32-unknown-unknown

    Inspired by discussion on
    rust-lang#129486 this is intended to at
    least document the current state of the world in a more public location
    than throughout a series of issues.
    alexcrichton committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    992b0b3 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2024

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

Commits on Aug 29, 2024

  1. Configuration menu
    Copy the full SHA
    8d3945d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    98106cf View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2024

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

Commits on Sep 3, 2024

  1. Adjust SanityCheck.

    The actual implementation remains in `rustc_mir_dataflow`, but this
    commit moves the `MirPass` impl to `rustc_mir_transform` and changes it
    to a `MirLint` (fixing a `FIXME` comment).
    
    (I originally tried moving the full implementation from
    `rustc_mir_dataflow` but I had some trait problems with `HasMoveData`
    and `RustcPeekAt` and `MaybeLiveLocals`. This commit was much smaller
    and simpler, but still will allow some follow-up cleanups.)
    nnethercote committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    5410900 View commit details
    Browse the repository at this point in the history
  2. Move MirPass to rustc_mir_transform.

    Because that's now the only crate that uses it.
    
    Moving stuff out of `rustc_middle` is always welcome.
    
    I chose to use `impl crate::MirPass`/`impl crate::MirLint` (with
    explicit `crate::`) everywhere because that's the only mention of
    `MirPass`/`MirLint` used in all of these files. (Prior to this change,
    `MirPass` was mostly imported via `use rustc_middle::mir::*` items.)
    nnethercote committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    2aae619 View commit details
    Browse the repository at this point in the history
  3. Reduce visibility of MirPass and related things.

    They're now all just used within this crate.
    nnethercote committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    827fa43 View commit details
    Browse the repository at this point in the history
  4. Clarify a comment.

    nnethercote committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    0b2b03c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6188aae View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    aa1f60e View commit details
    Browse the repository at this point in the history
  7. include 1.80.1 release notes on master

    Forgot this during the release process
    pietroalbini committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    17f3f92 View commit details
    Browse the repository at this point in the history
  8. Updates/clarifications

    alexcrichton committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    2d6d6a8 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#127692 - veera-sivarajan:bugfix-125139, r=e…

    …stebank
    
    Suggest `impl Trait` for References to Bare Trait in Function Header
    
    Fixes rust-lang#125139
    
    This PR suggests `impl Trait` when `&Trait` is found as a function parameter type or return type. This makes use of existing diagnostics by adding `peel_refs()` when checking for type equality.
    
    Additionaly, it makes a few other improvements:
    1. Checks if functions inside impl blocks have bare trait in their headers.
    2. Introduces a trait `NextLifetimeParamName` similar to the existing `NextTypeParamName` for suggesting a lifetime name. Also, abstracts out the common logic between the two trait impls.
    
    ### Related Issues
    I ran into a bunch of related diagnostic issues but couldn't fix them within the scope of this PR. So, I have created the following issues:
    1. [Misleading Suggestion when Returning a Reference to a Bare Trait from a Function](rust-lang#127689)
    2. [Verbose Error When a Function Takes a Bare Trait as Parameter](rust-lang#127690)
    3. [Incorrect Suggestion when Returning a Bare Trait from a Function](rust-lang#127691)
    
    r​? ``@estebank`` since you implemented  rust-lang#119148
    matthiaskrgr authored Sep 3, 2024
    Configuration menu
    Copy the full SHA
    4b38ef6 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#128701 - veera-sivarajan:fix-128604, r=este…

    …bank
    
    Don't Suggest Labeling `const` and `unsafe` Blocks
    
    Fixes rust-lang#128604
    
    Previously, both anonymous constant blocks (E.g. The labeled block
    inside `['_'; 'block: { break 'block 1 + 2; }]`) and inline const
    blocks (E.g. `const { ... }`) were considered to be the same
    kind of blocks. This caused the compiler to incorrectly suggest
    labeling both the blocks when only anonymous constant blocks can be
    labeled.
    
    This PR adds an other enum variant to `Context` so that both the
    blocks can be handled appropriately.
    
    Also, adds some doc comments and removes unnecessary `&mut` in a
    couple of places.
    matthiaskrgr authored Sep 3, 2024
    Configuration menu
    Copy the full SHA
    e3155ab View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#128934 - Nadrieril:fix-empty-non-exhaustive…

    …, r=compiler-errors
    
    Non-exhaustive structs may be empty
    
    This is a follow-up to a discrepancy noticed in rust-lang#122792: today, the following struct is considered inhabited (non-empty) outside its defining crate:
    ```rust
    #[non_exhaustive]
    pub struct UninhabitedStruct {
        pub never: !,
        // other fields
    }
    ```
    
    `#[non_exhaustive]` on a struct should mean that adding fields to it isn't a breaking change. There is no way that adding fields to this struct could make it non-empty since the `never` field must stay and is inconstructible. I suspect this was implemented this way due to confusion with `#[non_exhaustive]` enums, which indeed should be considered non-empty outside their defining crate.
    
    I propose that we consider such a struct uninhabited (empty), just like it would be without the `#[non_exhaustive]` annotation.
    
    Code that doesn't pass today and will pass after this:
    ```rust
    // In a different crate
    fn empty_match_on_empty_struct<T>(x: UninhabitedStruct) -> T {
        match x {}
    }
    ```
    
    This is not a breaking change.
    
    r? `@compiler-errors`
    matthiaskrgr authored Sep 3, 2024
    Configuration menu
    Copy the full SHA
    4e6fa3c View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#129630 - alexcrichton:document-broken-c-abi…

    …-on-wasm32-u-u, r=workingjubilee
    
    Document the broken C ABI of `wasm32-unknown-unknown`
    
    Inspired by discussion on
    rust-lang#129486 this is intended to at least document the current state of the world in a more public location than throughout a series of issues.
    matthiaskrgr authored Sep 3, 2024
    Configuration menu
    Copy the full SHA
    b9c99b6 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#129706 - compiler-errors:scratch, r=estebank

    Rename dump of coroutine by-move-body to be more consistent, fix ICE in dump_mir
    
    First, we add a missing match for `DefKind::SyntheticCoroutineBody` in `dump_mir`. Fixes rust-lang#129703. The second commit (directly below) serves as a test.
    
    Second, we reorder the `dump_mir` in `coroutine_by_move_body_def_id` to be *after* we adjust the body source, and change the disambiguator so it reads more like any other MIR body. This also serves as a test for the ICE, since we're dumping the MIR of a body with `DefKind::SyntheticCoroutineBody`.
    
    Third, we change the parenting of the synthetic MIR body to have the *coroutine-closure* (i.e. async closure) as its parent, so we don't have long strings of `{closure#0}-{closure#0}-{closure#0}`.
    matthiaskrgr authored Sep 3, 2024
    Configuration menu
    Copy the full SHA
    aa669ef View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#129896 - lcnr:bail-on-unknowable, r=jackh726

    do not attempt to prove unknowable goals
    
    In case a goal is unknowable, we previously still checked all other possible ways to prove this goal, even though its final result is already guaranteed to be ambiguous. By ignoring all other candidates in that case we can avoid a lot of unnecessary work, fixing the performance regression in typenum found in rust-lang#121848.
    
    This is already the behavior in the old solver. This could in theory cause future-compatability issues as considering fewer goals unknowable may end up causing performance regressions/hangs. I am quite confident that this will not be an issue.
    
    r? `@compiler-errors`
    matthiaskrgr authored Sep 3, 2024
    Configuration menu
    Copy the full SHA
    b777ba9 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#129926 - nnethercote:mv-SanityCheck-and-Mir…

    …Pass, r=cjgillot
    
    Move `SanityCheck` and `MirPass`
    
    They are currently in `rustc_middle`. This PR moves them to `rustc_mir_transform`, which makes more sense.
    
    r? `@cjgillot`
    matthiaskrgr authored Sep 3, 2024
    Configuration menu
    Copy the full SHA
    7a8ffbc View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#129928 - RalfJung:rustc_driver_impl-crt-sta…

    …tic, r=compiler-errors
    
    rustc_driver_impl: remove some old dead logic
    
    This got added in rust-lang@5013952, before `cfg(target_feature)` was stable. It should not be needed any more ever since `cfg(target_feature)` is stable.
    matthiaskrgr authored Sep 3, 2024
    Configuration menu
    Copy the full SHA
    b447cd5 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#129930 - ferrocene:pa-relnotes-1801, r=piet…

    …roalbini
    
    include 1.80.1 release notes on master
    
    Forgot this during the release process.
    matthiaskrgr authored Sep 3, 2024
    Configuration menu
    Copy the full SHA
    67c3113 View commit details
    Browse the repository at this point in the history