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

Merged
merged 30 commits into from
Aug 7, 2024
Merged

Rollup of 9 pull requests #128761

merged 30 commits into from
Aug 7, 2024

Commits on Jul 31, 2024

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

Commits on Aug 3, 2024

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

Commits on Aug 5, 2024

  1. Add a triagebot mention for library/Cargo.lock

    Since [1], `Cargo.lock` was split into `Cargo.lock` and
    `library/Cargo.lock`. Update Triagebot to give the same warning for both.
    
    [1]: rust-lang#128534
    tgross35 authored Aug 5, 2024
    Configuration menu
    Copy the full SHA
    c369c20 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4af77df View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c8d50ef View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c6d9482 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3fd645e View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2024

  1. Configuration menu
    Copy the full SHA
    fdb64b9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    97cbc20 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    522af10 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5783e73 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1c2705c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    db6c05f View commit details
    Browse the repository at this point in the history
  7. On trait bound mismatch, detect multiple crate versions in dep tree

    When encountering an E0277, if the type and the trait both come from a crate with the same name but different crate number, we explain that there are multiple crate versions in the dependency tree.
    
    If there's a type that fulfills the bound, and it has the same name as the passed in type and has the same crate name, we explain that the same type in two different versions of the same crate *are different*.
    
    ```
    error[E0277]: the trait bound `Type: dependency::Trait` is not satisfied
     --> src/main.rs:4:18
      |
    4 |     do_something(Type);
      |     ------------ ^^^^ the trait `dependency::Trait` is not implemented for `Type`
      |     |
      |     required by a bound introduced by this call
      |
    help: you have multiple different versions of crate `dependency` in your dependency graph
     --> src/main.rs:1:5
      |
    1 | use bar::do_something;
      |     ^^^ one version of crate `dependency` is used here, as a dependency of crate `bar`
    2 | use dependency::Type;
      |     ^^^^^^^^^^ one version of crate `dependency` is used here, as a direct dependency of the current crate
    note: two types coming from two different versions of the same crate are different types even if they look the same
     --> /home/gh-estebank/crate_versions/baz-2/src/lib.rs:1:1
      |
    1 | pub struct Type;
      | ^^^^^^^^^^^^^^^ this type doesn't implement the required trait
      |
     ::: /home/gh-estebank/crate_versions/baz/src/lib.rs:1:1
      |
    1 | pub struct Type;
      | ^^^^^^^^^^^^^^^ this type implements the required trait
    2 | pub trait Trait {}
      | --------------- this is the required trait
    note: required by a bound in `bar::do_something`
     --> /home/gh-estebank/crate_versions/baz/src/lib.rs:4:24
      |
    4 | pub fn do_something<X: Trait>(_: X) {}
      |                        ^^^^^ required by this bound in `do_something`
    ```
    
    Address rust-lang#22750.
    estebank committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    4868680 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ba32673 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d8b0771 View commit details
    Browse the repository at this point in the history
  10. fix rebase

    estebank committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    edd4162 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    f4bad4f View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    5e26c8d View commit details
    Browse the repository at this point in the history
  13. fix test

    estebank committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    034b73b View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    b9e8e99 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#124944 - estebank:multiple-crate-versions, …

    …r=fee1-dead
    
    On trait bound mismatch, detect multiple crate versions in dep tree
    
    When encountering an E0277, if the type and the trait both come from a crate with the same name but different crate number, we explain that there are multiple crate versions in the dependency tree.
    
    If there's a type that fulfills the bound, and it has the same name as the passed in type and has the same crate name, we explain that the same type in two different versions of the same crate *are different*.
    
    ```
    error[E0277]: the trait bound `Type: dependency::Trait` is not satisfied
     --> src/main.rs:4:18
      |
    4 |     do_something(Type);
      |     ------------ ^^^^ the trait `dependency::Trait` is not implemented for `Type`
      |     |
      |     required by a bound introduced by this call
      |
    help: you have multiple different versions of crate `dependency` in your dependency graph
     --> src/main.rs:1:5
      |
    1 | use bar::do_something;
      |     ^^^ one version of crate `dependency` is used here, as a dependency of crate `bar`
    2 | use dependency::Type;
      |     ^^^^^^^^^^ one version of crate `dependency` is used here, as a direct dependency of the current crate
    note: two types coming from two different versions of the same crate are different types even if they look the same
     --> /home/gh-estebank/crate_versions/baz-2/src/lib.rs:1:1
      |
    1 | pub struct Type;
      | ^^^^^^^^^^^^^^^ this type doesn't implement the required trait
      |
     ::: /home/gh-estebank/crate_versions/baz/src/lib.rs:1:1
      |
    1 | pub struct Type;
      | ^^^^^^^^^^^^^^^ this type implements the required trait
    2 | pub trait Trait {}
      | --------------- this is the required trait
    note: required by a bound in `bar::do_something`
     --> /home/gh-estebank/crate_versions/baz/src/lib.rs:4:24
      |
    4 | pub fn do_something<X: Trait>(_: X) {}
      |                        ^^^^^ required by this bound in `do_something`
    ```
    
    Address rust-lang#22750.
    matthiaskrgr authored Aug 6, 2024
    Configuration menu
    Copy the full SHA
    38e631e View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#125048 - dingxiangfei2009:stable-deref, r=a…

    …manieu
    
    PinCoerceUnsized trait into core
    
    cc ``@Darksonn`` ``@wedsonaf`` ``@ojeda``
    
    This is a PR to introduce a `PinCoerceUnsized` trait in order to make trait impls generated by the proc-macro `#[derive(SmartPointer)]`, proposed by [RFC](https://github.com/rust-lang/rfcs/blob/e17e19ac7ad1c8ccad55d4babfaee1aa107d1da5/text/3621-derive-smart-pointer.md#pincoerceunsized-1), sound. There you may find explanation, justification and discussion about the alternatives.
    
    Note that we do not seek stabilization of this `PinCoerceUnsized` trait in the near future. The stabilisation of this trait does not block the eventual stabilization process of the `#[derive(SmartPointer)]` macro. Ideally, use of `DerefPure` is more preferrable except this will actually constitute a breaking change. `PinCoerceUnsized` emerges as a solution to the said soundness hole while avoiding the breaking change. More details on the `DerefPure` option have been described in this [section](https://github.com/rust-lang/rfcs/blob/e17e19ac7ad1c8ccad55d4babfaee1aa107d1da5/text/3621-derive-smart-pointer.md#derefpure) of the RFC linked above.
    
    Earlier discussion can be found in this [Zulip stream](https://rust-lang.zulipchat.com/#narrow/stream/136281-t-opsem/topic/Pin.20and.20soundness.20of.20unsizing.20coercions) and [rust-for-linux thread](https://rust-lang.zulipchat.com/#narrow/stream/425075-rust-for-linux/topic/.23.5Bderive.28SmartPointer.29.5D.20and.20pin.20unsoundness.20rfc.233621).
    
    try-job: dist-various-2
    matthiaskrgr authored Aug 6, 2024
    Configuration menu
    Copy the full SHA
    16b251b View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#128406 - lolbinarycat:bufreader_peek, r=Mar…

    …k-Simulacrum
    
    implement BufReader::peek
    
    Part of rust-lang#128405
    matthiaskrgr authored Aug 6, 2024
    Configuration menu
    Copy the full SHA
    7e1360b View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#128539 - biabbas:deny_unsafe, r=workingjubilee

    Forbid unused unsafe in vxworks-specific std modules
    
    Tracking issue rust-lang#127747
    Adding deny(unsafe_op_in_unsafe_fn) in VxWorks specific files did not cause any error.
    Most of VxWorks falls back on Unix libraries. So we'll have to wait for Unix changes.
    
    r? ```@workingjubilee```
    matthiaskrgr authored Aug 6, 2024
    Configuration menu
    Copy the full SHA
    f00a551 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#128687 - RalfJung:interpret-call-refactor, …

    …r=WaffleLapkin
    
    interpret: refactor function call handling to be better-abstracted
    
    Add a new function `init_stack_frame` that pushes a stack frame and passes the arguments, and use that basically everywhere that the raw underlying `push_stack_frame` used to be called. This splits the previous monster function `eval_fn_call` into two parts: figuring out the MIR to call and the arguments to pass, and then actually setting up the stack frame.
    
    Also re-organize the files a bit:
    - The previous `terminator.rs` is split into a new `call.rs` with all the argument-passing logic, and the rest goes into `step.rs` where the other main dispatcher functions already live (in particular, `eval_statement`).
    - All the stack frame handling from `eval_context.rs` is moved to a new `stack.rs`.
    matthiaskrgr authored Aug 6, 2024
    Configuration menu
    Copy the full SHA
    52c365b View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#128692 - tgross35:update-triagebot, r=Mark-…

    …Simulacrum
    
    Add a triagebot mention for `library/Cargo.lock`
    
    Since [1], `Cargo.lock` was split into `Cargo.lock` and `library/Cargo.lock`. Update Triagebot to give the same warning for both.
    
    [1]: rust-lang#128534
    matthiaskrgr authored Aug 6, 2024
    Configuration menu
    Copy the full SHA
    03fabc0 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#128710 - ChrisDenton:null, r=jieyouxu

    Don't ICE when getting an input file name's stem fails
    
    Fixes rust-lang#128681
    
    The file stem is only used as a user-friendly prefix on intermediary files. While nice to have, it's not the end of the world if it fails so there's no real reason to emit an error here. We can continue with a fixed name as we do when an anonymous string is used.
    matthiaskrgr authored Aug 6, 2024
    Configuration menu
    Copy the full SHA
    f9325b7 View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#128718 - jieyouxu:check-cfg_attr, r=nnether…

    …cote
    
    Consider `cfg_attr` checked by `CheckAttrVisitor`
    
    I forgor about `cfg_attr` in rust-lang#128581, it should be treated like `cfg`.
    
    Fixes rust-lang#128716.
    matthiaskrgr authored Aug 6, 2024
    Configuration menu
    Copy the full SHA
    3158a86 View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#128751 - devnexen:vxworks_set_thread_name, …

    …r=tgross35
    
    std::thread: set_name implementation proposal for vxWorks.
    matthiaskrgr authored Aug 6, 2024
    Configuration menu
    Copy the full SHA
    6ed9a33 View commit details
    Browse the repository at this point in the history