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

Merged
merged 22 commits into from
Mar 21, 2023
Merged

Rollup of 8 pull requests #109453

merged 22 commits into from
Mar 21, 2023

Commits on Dec 2, 2022

  1. Windows: make Command prefer non-verbatim paths

    When spawning Commands, the path we use can end up being queried using `env::current_exe` (or the equivalent in other languages). Not all applications handle these paths properly therefore we should have a stronger preference for non-verbatim paths when spawning processes.
    ChrisDenton committed Dec 2, 2022
    Configuration menu
    Copy the full SHA
    920435f View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2023

  1. Configuration menu
    Copy the full SHA
    746331e View commit details
    Browse the repository at this point in the history
  2. std: add regression test for rust-lang#107466

    Tests that messages are immediately dropped once the last receiver is destroyed.
    joboet committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    642a324 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2023

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

Commits on Mar 14, 2023

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

Commits on Mar 19, 2023

  1. Configuration menu
    Copy the full SHA
    322c7b6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9174edb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1775722 View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2023

  1. Configuration menu
    Copy the full SHA
    cbb8066 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    93eeb12 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2023

  1. Configuration menu
    Copy the full SHA
    fb9e171 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    91d9131 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a00413f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3b04ad2 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#96391 - ChrisDenton:command-non-verbatim, r…

    …=joshtriplett
    
    Windows: make `Command` prefer non-verbatim paths
    
    When spawning Commands, the path we use can end up being queried using `env::current_exe` (or the equivalent in other languages). Not all applications handle these paths properly therefore we should have a stronger preference for non-verbatim paths when spawning processes.
    matthiaskrgr authored Mar 21, 2023
    Configuration menu
    Copy the full SHA
    1a43859 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#108164 - joboet:discard_messages_mpmc_array…

    …, r=Amanieu
    
    Drop all messages in bounded channel when destroying the last receiver
    
    Fixes rust-lang#107466 by splitting the `disconnect` function for receivers/transmitters and dropping all messages in `disconnect_receivers` like the unbounded channel does. Since all receivers must be dropped before the channel is, the messages will already be discarded at that point, so the `Drop` implementation for the channel can be removed.
    
    ``@rustbot`` label +T-libs +A-concurrency
    matthiaskrgr authored Mar 21, 2023
    Configuration menu
    Copy the full SHA
    93a82a4 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#108729 - bvanjoi:fix-issue-97534, r=petroch…

    …enkov
    
    fix: modify the condition that `resolve_imports` stops
    
    close rust-lang#97534
    matthiaskrgr authored Mar 21, 2023
    Configuration menu
    Copy the full SHA
    ee330a3 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#109336 - compiler-errors:constrain-to-ct-er…

    …r, r=BoxyUwU
    
    Constrain const vars to error if const types are mismatched
    
    When equating two consts of different types, if either are const variables, constrain them to the correct const error kind.
    
    This helps us avoid "successfully" matching a const against an impl signature but leaving unconstrained const vars, which will lead to incremental ICEs when we call const-eval queries during const projection.
    
    Fixes rust-lang#109296
    
    The second commit in the stack fixes a regression in the first commit where we end up mentioning `[const error]` in an impl overlap error message. I think the error message changes for the better, but I could implement alternative strategies to avoid this without delaying the overlap error message...
    
    r? `@BoxyUwU`
    matthiaskrgr authored Mar 21, 2023
    Configuration menu
    Copy the full SHA
    081c607 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#109403 - chenyukang:yukang/fix-109396, r=es…

    …tebank
    
    Avoid ICE of attempt to add with overflow in emitter
    
    Fixes rust-lang#109396
    r? ```@estebank```
    matthiaskrgr authored Mar 21, 2023
    Configuration menu
    Copy the full SHA
    25b062d View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#109415 - nnethercote:refactor-handle_missin…

    …g_lit, r=petrochenkov
    
    Refactor `handle_missing_lit`.
    
    A small code readability improvement.
    
    r? ```@petrochenkov```
    matthiaskrgr authored Mar 21, 2023
    Configuration menu
    Copy the full SHA
    96f35ed View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#109441 - oli-obk:fn_trait_new_solver, r=com…

    …piler-errors
    
    Only implement Fn* traits for extern "Rust" safe function pointers and items
    
    Since calling the function via an `Fn` trait will assume `extern "Rust"` ABI and not do any safety checks, only safe `extern "Rust"` function can implement the `Fn` traits. This syncs the logic between the old solver and the new solver.
    
    r? `@compiler-errors`
    matthiaskrgr authored Mar 21, 2023
    Configuration menu
    Copy the full SHA
    fef1fc4 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#109446 - spastorino:new-rpitit-17, r=compil…

    …er-errors
    
    Do not suggest bounds restrictions for synthesized RPITITs
    
    Before this PR we were getting ...
    
    ```
    warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
     --> tests/ui/async-await/in-trait/missing-send-bound.rs:5:12
      |
    5 | #![feature(async_fn_in_trait)]
      |            ^^^^^^^^^^^^^^^^^
      |
      = note: see issue rust-lang#91611 <rust-lang#91611> for more information
      = note: `#[warn(incomplete_features)]` on by default
    
    error: future cannot be sent between threads safely
      --> tests/ui/async-await/in-trait/missing-send-bound.rs:17:20
       |
    17 |     assert_is_send(test::<T>());
       |                    ^^^^^^^^^^^ future returned by `test` is not `Send`
       |
       = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `impl Future<Output = ()>`
    note: future is not `Send` as it awaits another future which is not `Send`
      --> tests/ui/async-await/in-trait/missing-send-bound.rs:13:5
       |
    13 |     T::bar().await;
       |     ^^^^^^^^ await occurs here on type `impl Future<Output = ()>`, which is not `Send`
    note: required by a bound in `assert_is_send`
      --> tests/ui/async-await/in-trait/missing-send-bound.rs:21:27
       |
    21 | fn assert_is_send(_: impl Send) {}
       |                           ^^^^ required by this bound in `assert_is_send`
    help: consider further restricting the associated type
       |
    16 | fn test2<T: Foo>() where impl Future<Output = ()>: Send {
       |                    ++++++++++++++++++++++++++++++++++++
    
    error: aborting due to previous error; 1 warning emitted
    ```
    
    and we want this output ...
    
    ```
    warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
      --> $DIR/missing-send-bound.rs:5:12
       |
    LL | #![feature(async_fn_in_trait)]
       |            ^^^^^^^^^^^^^^^^^
       |
       = note: see issue rust-lang#91611 <rust-lang#91611> for more information
       = note: `#[warn(incomplete_features)]` on by default
    
    error: future cannot be sent between threads safely
      --> $DIR/missing-send-bound.rs:17:20
       |
    LL |     assert_is_send(test::<T>());
       |                    ^^^^^^^^^^^ future returned by `test` is not `Send`
       |
       = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `impl Future<Output = ()>`
    note: future is not `Send` as it awaits another future which is not `Send`
      --> $DIR/missing-send-bound.rs:13:5
       |
    LL |     T::bar().await;
       |     ^^^^^^^^ await occurs here on type `impl Future<Output = ()>`, which is not `Send`
    note: required by a bound in `assert_is_send`
      --> $DIR/missing-send-bound.rs:21:27
       |
    LL | fn assert_is_send(_: impl Send) {}
       |                           ^^^^ required by this bound in `assert_is_send`
    
    error: aborting due to previous error; 1 warning emitted
    ```
    
    r? `@compiler-errors`
    matthiaskrgr authored Mar 21, 2023
    Configuration menu
    Copy the full SHA
    94d2028 View commit details
    Browse the repository at this point in the history