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

Merged
merged 17 commits into from
Nov 17, 2024
Merged

Rollup of 6 pull requests #133135

merged 17 commits into from
Nov 17, 2024

Commits on Nov 14, 2024

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

Commits on Nov 15, 2024

  1. Trim whitespace in RemoveLet primary span

    Separate `RemoveLet` span into primary span for `let` and removal
    suggestion span for `let `, so that primary span does not include
    whitespace.
    
    Fixes: rust-lang#133031
    
    Signed-off-by: Tyrone Wu <[email protected]>
    tyrone-wu committed Nov 15, 2024
    Configuration menu
    Copy the full SHA
    dd557c9 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2024

  1. Configuration menu
    Copy the full SHA
    427d915 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f502dce View commit details
    Browse the repository at this point in the history
  3. Increase accuracy of if condition misparse suggestion

    Look at the expression that was parsed when trying to recover from a bad `if` condition to determine what was likely intended by the user beyond "maybe this was meant to be an `else` body".
    
    ```
    error: expected `{`, found `map`
      --> $DIR/missing-dot-on-if-condition-expression-fixable.rs:4:30
       |
    LL |     for _ in [1, 2, 3].iter()map(|x| x) {}
       |                              ^^^ expected `{`
       |
    help: you might have meant to write a method call
       |
    LL |     for _ in [1, 2, 3].iter().map(|x| x) {}
       |                              +
    ```
    estebank committed Nov 16, 2024
    Configuration menu
    Copy the full SHA
    04fe839 View commit details
    Browse the repository at this point in the history
  4. Better account for else if macro conditions mising an if

    If a macro statement has been parsed after `else`, suggest a missing `if`:
    
    ```
    error: expected `{`, found `falsy`
      --> $DIR/else-no-if.rs:47:12
       |
    LL |     } else falsy! {} {
       |       ---- ^^^^^
       |       |
       |       expected an `if` or a block after this `else`
       |
    help: add an `if` if this is the condition of a chained `else if` statement
       |
    LL |     } else if falsy! {} {
       |            ++
    ```
    estebank committed Nov 16, 2024
    Configuration menu
    Copy the full SHA
    629a69f View commit details
    Browse the repository at this point in the history
  5. Reword suggestion message

    estebank committed Nov 16, 2024
    Configuration menu
    Copy the full SHA
    c09c73b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6913194 View commit details
    Browse the repository at this point in the history
  7. stabilize const_ptr_is_null

    RalfJung committed Nov 16, 2024
    Configuration menu
    Copy the full SHA
    5eef5ee View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    543627d View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2024

  1. alloc: fix String's doc

    ohno418 committed Nov 17, 2024
    Configuration menu
    Copy the full SHA
    ec65dfc View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#133029 - veluca93:abi-checks-tier3, r=worki…

    …ngjubilee
    
    ABI checks: add support for some tier3 arches, warn on others.
    
    Followup to
    - rust-lang#132842
    - rust-lang#132173
    - rust-lang#131800
    
    r? ``@workingjubilee``
    jieyouxu authored Nov 17, 2024
    Configuration menu
    Copy the full SHA
    2d9690d View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#133051 - estebank:cond-misparse, r=jieyouxu

    Increase accuracy of `if` condition misparse suggestion
    
    Fix rust-lang#132656.
    
    Look at the expression that was parsed when trying to recover from a bad `if` condition to determine what was likely intended by the user beyond "maybe this was meant to be an `else` body".
    
    ```
    error: expected `{`, found `map`
      --> $DIR/missing-dot-on-if-condition-expression-fixable.rs:4:30
       |
    LL |     for _ in [1, 2, 3].iter()map(|x| x) {}
       |                              ^^^ expected `{`
       |
    help: you might have meant to write a method call
       |
    LL |     for _ in [1, 2, 3].iter().map(|x| x) {}
       |                              +
    ```
    
    If a macro statement has been parsed after `else`, suggest a missing `if`:
    
    ```
    error: expected `{`, found `falsy`
      --> $DIR/else-no-if.rs:47:12
       |
    LL |     } else falsy! {} {
       |       ---- ^^^^^
       |       |
       |       expected an `if` or a block after this `else`
       |
    help: add an `if` if this is the condition of a chained `else if` statement
       |
    LL |     } else if falsy! {} {
       |            ++
    ```
    jieyouxu authored Nov 17, 2024
    Configuration menu
    Copy the full SHA
    2f62fd3 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#133060 - tyrone-wu:removelet-span-suggestio…

    …n, r=jieyouxu
    
    Trim whitespace in RemoveLet primary span
    
    Separate `RemoveLet` span into primary span for `let` and removal suggestion span for `let `, so that primary span does not include whitespace.
    
    Fixes: rust-lang#133031
    jieyouxu authored Nov 17, 2024
    Configuration menu
    Copy the full SHA
    0b157e8 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#133093 - est31:let_chains_tests, r=traviscross

    Let chains tests
    
    Filing this as this marks off two of the open issues in rust-lang#132833:
    
    * extending the tests for `move-guard-if-let-chain.rs` and `conflicting_bindings.rs` to have chains with multiple let's (one implementation could for example search for the first `let` and then terminate).
    * An instance where a temporary lives shorter than with nested ifs, breaking compilation: rust-lang#103476. This was fixed in the end by the if let rescoping work.
    
    Closes rust-lang#103476
    jieyouxu authored Nov 17, 2024
    Configuration menu
    Copy the full SHA
    ccc3f86 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#133116 - RalfJung:const-null-ptr, r=dtolnay

    stabilize const_ptr_is_null
    
    FCP passed in rust-lang#74939.
    
    The second commit cleans up const stability around UB checks a bit, now that everything they need (except for `const_eval_select`) is stable.
    
    Fixes rust-lang#74939
    jieyouxu authored Nov 17, 2024
    Configuration menu
    Copy the full SHA
    af1c8be View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#133126 - ohno418:fix-String-doc, r=jhpratt

    alloc: fix `String`'s doc
    
    Just a minor fix for `String` struct.
    jieyouxu authored Nov 17, 2024
    Configuration menu
    Copy the full SHA
    defc866 View commit details
    Browse the repository at this point in the history