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

Merged
merged 23 commits into from
Jul 18, 2024
Merged

Rollup of 8 pull requests #127865

merged 23 commits into from
Jul 18, 2024

Commits on Jul 2, 2024

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

Commits on Jul 4, 2024

  1. Move a few intrinsics to use Rust abi

    Move a few more intrinsic functions to the convention added in rust-lang#121192
    where they have Rust abi but are tagged with `rustc_intrinsic`.
    celinval committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    52fb17a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f27023a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b096c08 View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2024

  1. Remove the non-assigning form of unpack!

    This kind of unpacking can be expressed as an ordinary method on
    `BlockAnd<()>`.
    Zalathar committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    4fe8dd0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1cf4eb2 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2024

  1. Use ordinal number in argument error

    Fix error message
    
    Fix tests
    
    Format
    long-long-float committed Jul 14, 2024
    Configuration menu
    Copy the full SHA
    332b41d View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2024

  1. Configuration menu
    Copy the full SHA
    247ad33 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    324d2e5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7e1c4af View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2024

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

Commits on Jul 17, 2024

  1. If the moved value is a mut reference, it is used in a generic functi…

    …on and it's type is a generic param, it can be reborrowed to avoid moving.
    
    for example:
    
    ```rust
    struct Y(u32);
    // x's type is '& mut Y' and it is used in `fn generic<T>(x: T) {}`.
    fn generic<T>(x: T) {}
    ```
    
    fixes rust-lang#127285
    surechen committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    4821b84 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    40e07a3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2c2ef6c View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#125042 - long-long-float:suggest-move-arg-o…

    …utside, r=fmease
    
    Use ordinal number in argument error
    
    Add an ordinal number to two argument errors ("unexpected" and "missing") for ease of understanding error.
    
    ```
    error[E0061]: this function takes 3 arguments but 2 arguments were supplied
      --> test.rs:11:5
       |
    11 |     f(42, 'a');
       |     ^     --- 2nd argument of type `f32` is missing
       |
    (snip)
    
    error[E0061]: this function takes 3 arguments but 4 arguments were supplied
      --> test.rs:12:5
       |
    12 |     f(42, 42, 1.0, 'a');
       |     ^   ----
       |         | |
       |         | unexpected 2nd argument of type `{integer}`
       |         help: remove the extra argument
    ```
    
    To get an ordinal number, I copied `ordinalize` from other crate `rustc_resolve` because I think it is too much to link `rustc_resolve` for this small function. Please let me know if there is a better way.
    matthiaskrgr committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    2b34490 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#127229 - notriddle:notriddle/mile-wide-bar,…

    … r=GuillaumeGomez
    
    rustdoc: click target for sidebar items flush left
    
    This change adjusts the clickable area of sidebar links to touch the leftmost edge of the canvas, making them [much easier](https://www.nngroup.com/articles/fitts-law/) to click (when the browser window is maximized or tiled left, but those cases are common enough to matter).
    
    [Screencast from 2024-07-15 15-31-07.webm](https://github.com/user-attachments/assets/1e952d3a-e9e7-476b-b211-44a17c190b38)
    
    <details><summary>old screencast</summary>
    
    [Screencast from 2024-07-01 17-23-34.webm](https://github.com/rust-lang/rust/assets/1593513/dc6f9c2e-5904-403d-b353-d233e6e1afbc)
    
    </details>
    matthiaskrgr committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    0472b2a View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#127337 - celinval:intrinsics-fallback, r=ol…

    …i-obk
    
    Move a few intrinsics to Rust abi
    
    Move a few more intrinsic functions to the convention added in rust-lang#121192. In the second commit, I added documentation about their safety requirements. Let me know if you would like me to move the second commit to a different PR.
    
    Note: I kept the same signature of `pref_align_of`, but I was wondering why this function is considered unsafe?
    matthiaskrgr committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    3ddfd97 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#127472 - Zalathar:block-and-unit, r=fmease

    MIR building: Stop using `unpack!` for `BlockAnd<()>`
    
    This is a subset of rust-lang#127416, containing only the parts related to `BlockAnd<()>`.
    
    The first patch removes the non-assigning form of the `unpack!` macro, because it is frustratingly inconsistent with the main form. We can replace it with an ordinary method that discards the `()` and returns the block.
    
    The second patch then finds all of the remaining code that was using `unpack!` with `BlockAnd<()>`, and updates it to use that new method instead.
    
    ---
    
    Changes since original review of rust-lang#127416:
    - Renamed `fn unpack_block` → `fn into_block`
    - Removed `fn unpack_discard`, replacing it with `let _: BlockAnd<()> = ...` (2 occurrences)
    - Tweaked `arm_end_blocks` to unpack earlier and build `Vec<BasicBlock>` instead of `Vec<BlockAnd<()>>`
    matthiaskrgr committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    c98487e View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#127579 - surechen:fix_127285, r=lcnr

    Solve a error `.clone()` suggestion when moving a mutable reference
    
    If the moved value is a mut reference, it is used in a generic function and it's type is a generic param, suggest it can be reborrowed to avoid moving.
    
    for example:
    
    ```rust
    struct Y(u32);
    // x's type is '& mut Y' and it is used in `fn generic<T>(x: T) {}`.
    fn generic<T>(x: T) {}
    ```
    
    fixes rust-lang#127285
    matthiaskrgr committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    23dd3a0 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#127769 - compiler-errors:ed-2024-dep, r=oli…

    …-obk
    
    Don't use implicit features in `Cargo.toml` in `compiler/`
    
    Fixes compiler crates to stop using implicit features (rust-lang/cargo#12826) which are denied in in edition 2024.
    matthiaskrgr committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    9db57bf View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#127844 - chenyukang:yukang-fix-type-bound-1…

    …27555, r=jieyouxu
    
    Remove invalid further restricting suggestion for type bound
    
    This PR partially addresses rust-lang#127555, it will remove the obvious error suggestion:
    
    ```console
       |                      ^^^^ required by this bound in `<Baz as Foo>::bar`
    help: consider further restricting this bound
       |
    12 |         F: FnMut() + Send + std::marker::Send,
       |                           +++++++++++++++++++
    ```
    
    I may create another PR to get a better diagnostic for `impl has stricter requirements than trait` scenario.
    matthiaskrgr committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    1e1e64f View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#127855 - chenyukang:yukang-add-triagebot, r…

    …=jieyouxu
    
    Add myself to review rotation
    
    r? `@wesleywiser`
    matthiaskrgr committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    2ea21cf View commit details
    Browse the repository at this point in the history