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 7 pull requests #118443

Merged
merged 17 commits into from
Nov 29, 2023
Merged

Rollup of 7 pull requests #118443

merged 17 commits into from
Nov 29, 2023

Commits on Nov 24, 2023

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

Commits on Nov 27, 2023

  1. Print list of missing target features when calling a function with ta…

    …rget features outside an unsafe block
    eduardosm committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    51ba662 View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2023

  1. Configuration menu
    Copy the full SHA
    b1a6cf4 View commit details
    Browse the repository at this point in the history
  2. Suggest let or == on typo'd let-chain

    When encountering a bare assignment in a let-chain, suggest turning the
    assignment into a `let` expression or an equality check.
    
    ```
    error: expected expression, found `let` statement
      --> $DIR/bad-if-let-suggestion.rs:5:8
       |
    LL |     if let x = 1 && i = 2 {}
       |        ^^^^^^^^^
       |
       = note: only supported directly in conditions of `if` and `while` expressions
    help: you might have meant to continue the let-chain
       |
    LL |     if let x = 1 && let i = 2 {}
       |                     +++
    help: you might have meant to compare for equality
       |
    LL |     if let x = 1 && i == 2 {}
       |                        +
    ```
    estebank committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    55e4e3e View commit details
    Browse the repository at this point in the history
  3. thir-unsafeck: print list of missing target features when calling a f…

    …unction with target features outside an unsafe block
    eduardosm committed Nov 28, 2023
    Configuration menu
    Copy the full SHA
    6b066a9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9121a41 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6e956c0 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2023

  1. rustdoc: Move AssocItemRender and RenderMode to html::render.

    They're only used for HTML, so it makes more sense for them to live
    their.
    aDotInTheVoid committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    69a79ce View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a3838c8 View commit details
    Browse the repository at this point in the history
  3. Update nto-qnx.md

    x.py does not support specify multiple --target keywords. The targets must be specified comma separated.
    AkhilTThomas authored Nov 29, 2023
    Configuration menu
    Copy the full SHA
    e4121c5 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#118157 - Nadrieril:never_pat-feature-gate, …

    …r=compiler-errors
    
    Add `never_patterns` feature gate
    
    This PR adds the feature gate and most basic parsing for the experimental `never_patterns` feature. See the tracking issue (rust-lang#118155) for details on the experiment.
    
    `@scottmcm` has agreed to be my lang-team liaison for this experiment.
    matthiaskrgr authored Nov 29, 2023
    Configuration menu
    Copy the full SHA
    c03f891 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#118191 - estebank:let-chain-typo, r=compile…

    …r-errors
    
    Suggest `let` or `==` on typo'd let-chain
    
    When encountering a bare assignment in a let-chain, suggest turning the
    assignment into a `let` expression or an equality check.
    
    ```
    error: expected expression, found `let` statement
      --> $DIR/bad-if-let-suggestion.rs:5:8
       |
    LL |     if let x = 1 && i = 2 {}
       |        ^^^^^^^^^
       |
       = note: only supported directly in conditions of `if` and `while` expressions
    help: you might have meant to continue the let-chain
       |
    LL |     if let x = 1 && let i = 2 {}
       |                     +++
    help: you might have meant to compare for equality
       |
    LL |     if let x = 1 && i == 2 {}
       |                        +
    ```
    matthiaskrgr authored Nov 29, 2023
    Configuration menu
    Copy the full SHA
    aab61d0 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#118231 - RalfJung:const-raw-slice-empty, r=…

    …cuviper
    
    also add is_empty to const raw slices
    
    We have this on mutable raw slices but not const raw slices, which makes little sense.
    
    Cc rust-lang#71146
    matthiaskrgr authored Nov 29, 2023
    Configuration menu
    Copy the full SHA
    afe2d73 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#118333 - eduardosm:print-missing-target-fea…

    …tures, r=est31
    
    Print list of missing target features when calling a function with target features outside an unsafe block
    
    Fixes rust-lang#108680
    
    Supersedes rust-lang#109710. I used the same wording for the messages, but the implementation is different.
    
    r? `@est31`
    matthiaskrgr authored Nov 29, 2023
    Configuration menu
    Copy the full SHA
    911a5ee View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#118426 - aDotInTheVoid:const-wat, r=compile…

    …r-errors,cjgillot
    
    ConstProp: Correctly remove const if unknown value assigned to it.
    
    Closes rust-lang#118328
    
    The problematic sequence of MIR is:
    
    ```rust
              _1 = const 0_usize;
              _1 = const _; // This is an associated constant we can't know before monomorphization.
              _0 = _1;
    ```
    
    1. When `ConstProp::visit_assign` happens on `_1 = const 0_usize;`, it records that `0x0usize` is the value for `_1`.
    2. Next `visit_assign` happens on `_1 = const _;`. Because the rvalue `.has_param()`, it can't be const evaled.
    3. Finaly, `visit_assign` happens on `_0 = _1;`. Here it would think the value of `_1` was `0x0usize` from step 1.
    
    The solution is to remove consts when checking the RValue fails, as they may have contained values that should now be invalidated, as that local was overwritten.
    
    This should probably be back-ported to beta. Stable is more iffy, as it's gone unidentified since 1.70, so I only think it's worthwhile if there's another reason for a 1.74.1 release anyway.
    matthiaskrgr authored Nov 29, 2023
    Configuration menu
    Copy the full SHA
    434232f View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#118428 - aDotInTheVoid:doc-cleanup, r=Guill…

    …aumeGomez
    
    rustdoc: Move `AssocItemRender` and `RenderMode` to `html::render`.
    
    They're only used for HTML, so it makes more sense for them to live their.
    matthiaskrgr authored Nov 29, 2023
    Configuration menu
    Copy the full SHA
    1e8ecec View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#118438 - AkhilTThomas:patch-1, r=JohnTitor

    Update nto-qnx.md
    
    x.py does not support specifying multiple `--target` keywords. The targets must be specified comma separated.
    
    Error:
    `error: the argument '--target <TARGET>' cannot be used multiple times`
    matthiaskrgr authored Nov 29, 2023
    Configuration menu
    Copy the full SHA
    6094cb5 View commit details
    Browse the repository at this point in the history