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 8 pull requests #120649

Merged
merged 38 commits into from
Feb 5, 2024
Merged

Rollup of 8 pull requests #120649

merged 38 commits into from
Feb 5, 2024

Commits on Jan 8, 2024

  1. Configuration menu
    Copy the full SHA
    1eaeaaf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e05c779 View commit details
    Browse the repository at this point in the history
  3. Add FileCheck for enum.rs

    sfzhu93 committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    33e5d85 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2024

  1. Configuration menu
    Copy the full SHA
    24aefa0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9452d7e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e9152e2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3ab1d5d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d765e3a View commit details
    Browse the repository at this point in the history
  6. Add FileCheck to struct.rs

    sfzhu93 committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    732f6a1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1adda9a View commit details
    Browse the repository at this point in the history
  8. Add FileCheck for enum.rs

    sfzhu93 committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    7135168 View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2024

  1. resolve code reviews

    sfzhu93 committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    d63f10b View commit details
    Browse the repository at this point in the history
  2. resolve code reviews

    sfzhu93 committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    1c886d7 View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2024

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

Commits on Jan 15, 2024

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

Commits on Jan 20, 2024

  1. update misuse of check-label

    sfzhu93 committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    edba949 View commit details
    Browse the repository at this point in the history
  2. finish a pattern in enum.rs

    sfzhu93 committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    7ad307d View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2024

  1. update enum.rs

    sfzhu93 committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    65b1083 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2024

  1. update terminator.rs

    sfzhu93 committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    699b59c View commit details
    Browse the repository at this point in the history
  2. Only suggest removal of as_* and to_ conversion methods on E0308

    Instead of
    
    ```
    error[E0308]: mismatched types
     --> tests/ui/suggestions/only-suggest-removal-of-conversion-method-calls.rs:9:5
      |
    4 | fn get_name() -> String {
      |                  ------ expected `String` because of return type
    ...
    9 |     your_name.trim() //~ ERROR E0308
      |     ^^^^^^^^^^^^^^^^ expected `String`, found `&str`
      |
    help: try removing the method call
      |
    9 -     your_name.trim()
    9 +     your_name
    ```
    
    output
    
    ```
    error[E0308]: mismatched types
      --> $DIR/only-suggest-removal-of-conversion-method-calls.rs:9:5
       |
    LL | fn get_name() -> String {
       |                  ------ expected `String` because of return type
    ...
    LL |     your_name.trim()
       |     ^^^^^^^^^^^^^^^^- help: try using a conversion method: `.to_string()`
       |     |
       |     expected `String`, found `&str`
    ```
    
    Fix rust-lang#114329.
    estebank committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    44d8ecb View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2024

  1. On E0277 be clearer about implicit Sized bounds on type params and …

    …assoc types
    
    ```
    error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
       --> f100.rs:2:33
        |
    2   |     let _ = std::mem::size_of::<[i32]>();
        |                                 ^^^^^ doesn't have a size known at compile-time
        |
        = help: the trait `Sized` is not implemented for `[i32]`
    note: required by an implicit `Sized` bound in `std::mem::size_of`
       --> /home/gh-estebank/rust/library/core/src/mem/mod.rs:312:22
        |
    312 | pub const fn size_of<T>() -> usize {
        |                      ^ required by the implicit `Sized` requirement on this bound in `size_of`
    ```
    
    Fix rust-lang#120178.
    estebank committed Feb 1, 2024
    Configuration menu
    Copy the full SHA
    c4c22b0 View commit details
    Browse the repository at this point in the history
  2. Change incr comp test when adding explicit Sized bound

    Given the previous change to add implicit `Sized` bounds only if there
    isn't already an explicit `Sized` bound, now the incr comp machinery
    doesn't consider adding the explicit bound as being dirty, as long as
    `-Zincremental-ignore-spans` is set.
    estebank committed Feb 1, 2024
    Configuration menu
    Copy the full SHA
    95d9009 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8b0ab54 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4feec41 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0148da3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    02320b5 View commit details
    Browse the repository at this point in the history
  7. add test for try-block-in-match-arm

    This is noted as an implementation concern under the tracking issue for `?` and `try` blocks. (Issue 31436)
    Fishrock123 committed Feb 1, 2024
    Configuration menu
    Copy the full SHA
    bedd81e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    2c0030f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0f21e45 View commit details
    Browse the repository at this point in the history
  10. fix rebase

    estebank committed Feb 1, 2024
    Configuration menu
    Copy the full SHA
    0df6dfd View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2024

  1. Rollup merge of rust-lang#119759 - sfzhu93:master, r=cjgillot

    Add FileCheck annotations to dataflow-const-prop tests
    
    part of rust-lang#116971.
    
    A few shadowing variable names are changed, so that it is easier to match the variable names in MIR using FileCheck syntax.
    
    Also, there's a FIXME in [enum.rs](https://github.com/rust-lang/rust/pull/119759/files#diff-7621f55327838e489a95ac99ae1e6126b37c57aff582594e6bee9d7e7e56fc58) because the MIR looks suspicious to me. It has been explained in the comments.
    
    r? cjgillot
    matthiaskrgr authored Feb 4, 2024
    Configuration menu
    Copy the full SHA
    2b25957 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#120323 - estebank:issue-120178, r=fmease

    On E0277 be clearer about implicit `Sized` bounds on type params and assoc types
    
    ```
    error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
       --> f100.rs:2:33
        |
    2   |     let _ = std::mem::size_of::<[i32]>();
        |                                 ^^^^^ doesn't have a size known at compile-time
        |
        = help: the trait `Sized` is not implemented for `[i32]`
    note: required by an implicit `Sized` bound in `std::mem::size_of`
       --> /home/gh-estebank/rust/library/core/src/mem/mod.rs:312:22
        |
    312 | pub const fn size_of<T>() -> usize {
        |                      ^ required by the implicit `Sized` requirement on this bound in `size_of`
    ```
    
    Fix rust-lang#120178.
    matthiaskrgr authored Feb 4, 2024
    Configuration menu
    Copy the full SHA
    6af0458 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#120473 - estebank:issue-114329, r=TaKO8Ki

    Only suggest removal of `as_*` and `to_` conversion methods on E0308
    
    Instead of
    
    ```
    error[E0308]: mismatched types
     --> tests/ui/suggestions/only-suggest-removal-of-conversion-method-calls.rs:9:5
      |
    4 | fn get_name() -> String {
      |                  ------ expected `String` because of return type
    ...
    9 |     your_name.trim()
      |     ^^^^^^^^^^^^^^^^ expected `String`, found `&str`
      |
    help: try removing the method call
      |
    9 -     your_name.trim()
    9 +     your_name
    ```
    
    output
    
    ```
    error[E0308]: mismatched types
      --> $DIR/only-suggest-removal-of-conversion-method-calls.rs:9:5
       |
    LL | fn get_name() -> String {
       |                  ------ expected `String` because of return type
    ...
    LL |     your_name.trim()
       |     ^^^^^^^^^^^^^^^^- help: try using a conversion method: `.to_string()`
       |     |
       |     expected `String`, found `&str`
    ```
    
    Fix rust-lang#114329.
    matthiaskrgr authored Feb 4, 2024
    Configuration menu
    Copy the full SHA
    b23945c View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#120540 - Fishrock123:test-try-block-in-matc…

    …h-arm, r=compiler-errors
    
    add test for try-block-in-match-arm
    
    This is noted as an implementation concern under the tracking issue for `?` and `try` blocks. (Issue 31436)
    
    Refs: rust-lang#31436
    matthiaskrgr authored Feb 4, 2024
    Configuration menu
    Copy the full SHA
    592beb1 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#120547 - matthewjasper:complete-inline-cons…

    …t-pat, r=compiler-errors
    
    `#![feature(inline_const_pat)]` is no longer incomplete
    
    Now that borrow checking and safety checking is implemented for inline constant patterns, the incomplete feature status is not necessary. Stabilizing this feature requires more testing and has some of the same unresolved questions as inline constants.
    
    cc rust-lang#76001
    matthiaskrgr authored Feb 4, 2024
    Configuration menu
    Copy the full SHA
    fa7d3e9 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#120552 - GuillaumeGomez:never-type-feature-…

    …gate, r=compiler-errors
    
    Correctly check `never_type` feature gating
    
    Fixes rust-lang#120542.
    
    The feature wasn't tested on return type of a generic function type, so it got under the radar in rust-lang#120316.
    
    r? ```@compiler-errors```
    matthiaskrgr authored Feb 4, 2024
    Configuration menu
    Copy the full SHA
    c2ad283 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#120555 - pnkfelix:put-pnkfelix-back-on-revi…

    …ew-queue, r=Mark-Simulacrum
    
    put pnkfelix (me) back on the review queue.
    
    I have more bandwidth and want to take on more review load.
    matthiaskrgr authored Feb 4, 2024
    Configuration menu
    Copy the full SHA
    1547510 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#120556 - fmease:improve-unused-generic-para…

    …m-diags, r=oli-obk
    
    Improve the diagnostics for unused generic parameters
    
    * Don't emit two errors (namely E0091 *and* E0392) for unused type parameters on *lazy* type aliases
    * Fix the diagnostic help message of E0392 for *lazy* type aliases: Don't talk about the “fields” of lazy type aliases (use the term “body” instead) and don't suggest `PhantomData` for them, it doesn't make much sense
    * Consolidate the diagnostics for E0091 (unused type parameters in type aliases) and E0392 (unused generic parameters due to bivariance) and make it translatable
      * Still keep the error codes distinct (for now)
      * Naturally leads to better diagnostics for E0091
    
    r? ```@oli-obk``` (to ballast your review load :P) or compiler
    matthiaskrgr authored Feb 4, 2024
    Configuration menu
    Copy the full SHA
    7fa99bf View commit details
    Browse the repository at this point in the history