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 6 pull requests #95650

Closed
wants to merge 25 commits into from
Closed

Commits on Mar 21, 2022

  1. Release notes for 1.60.0

    cuviper committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    02dbf24 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1a49636 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7382f22 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d47fba7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fc3d57c View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2022

  1. Add SyncUnsafeCell.

    m-ou-se committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    750ab03 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f225808 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2022

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

Commits on Apr 2, 2022

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

Commits on Apr 3, 2022

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

Commits on Apr 4, 2022

  1. tweaks and typos

    RalfJung committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    def863d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    62f37da View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b81d430 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e393ed7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    91beb32 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9c0de7b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    af8b6b6 View commit details
    Browse the repository at this point in the history
  8. improve 92630 wording

    pietroalbini committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    82eedae View commit details
    Browse the repository at this point in the history
  9. Stabilize total_cmp

    golddranks committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    1b9cd5b View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#94817 - cuviper:relnotes-1.60.0, r=pietroal…

    …bini,m-ou-se
    
    Release notes for 1.60.0
    Dylan-DPC committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    a09edbc View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#95431 - golddranks:stabilize_total_cmp, r=s…

    …cottmcm
    
    Stabilize total_cmp
    
    Stabilises `total_cmp` for Rust 1.61.0. Tracking issue: rust-lang#72599
    Dylan-DPC committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    cf72188 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#95438 - m-ou-se:sync-unsafe-cell, r=joshtri…

    …plett
    
    Add SyncUnsafeCell.
    
    This adds `SyncUnsafeCell`, which is just `UnsafeCell` except it implements `Sync`.
    
    This was first proposed under the name `RacyUnsafeCell` here: rust-lang#53639 (comment) and here: rust-lang#53639 (comment) and here: rust-lang#53639 (comment)
    
    It allows you to create an UnsafeCell that is Sync without having to wrap it in a struct first (and then implement Sync for that struct).
    
    E.g. `static X: SyncUnsafeCell<i32>`. Using a regular `UnsafeCell` as `static` is not possible, because it isn't `Sync`. We have a language workaround for it called `static mut`, but it's nice to be able to use the proper type for such unsafety instead.
    
    It also makes implementing synchronization primitives based on unsafe cells slightly less verbose, because by using `SyncUnsafeCell` for `UnsafeCell`s that are shared between threads, you don't need a separate `impl<..> Sync for ..`. Using this type also clearly documents that the cell is expected to be accessed from multiple threads.
    Dylan-DPC committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    6100441 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#95467 - ChrisDenton:async-read-pipe, r=josh…

    …triplett
    
    Windows: Synchronize asynchronous pipe reads and writes
    
    On Windows, the pipes used for spawned processes are opened for asynchronous access but `read` and `write` are done using the standard methods that assume synchronous access. This means that the buffer (and variables on the stack) may be read/written to after the function returns.
    
    This PR ensures reads/writes complete before returning. Note that this only applies to pipes we create and does not affect the standard file read/write methods.
    
    Fixes rust-lang#95411
    Dylan-DPC committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    80b352f View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#95588 - RalfJung:strict-provenance, r=scottmcm

    explicitly distinguish pointer::addr and pointer::expose_addr
    
    `@bgeron` pointed out that the current docs promise that `ptr.addr()` and `ptr as usize` are equivalent. I don't think that is a promise we want to make. (Conceptually, `ptr as usize` might 'escape' the provenance to enable future `usize as ptr` casts, but `ptr.addr()` dertainly does not do that.)
    
    So I propose we word the docs a bit more carefully here. `@Gankra` what do you think?
    Dylan-DPC committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    298c65c View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#95603 - compiler-errors:dyn-return, r=oli-obk

    Fix late-bound ICE in `dyn` return type suggestion
    
    This fixes the root-cause of the attached issues -- the root problem is that we're using the return type from a signature with late-bound instead of early-bound regions. The change on line 1087 (`let Some(liberated_sig) = typeck_results.liberated_fn_sigs().get(fn_hir_id) else { return false; };`) makes sure we're grabbing the _right_ return type for this suggestion to check the `dyn` predicates with.
    
    Fixes rust-lang#91801
    Fixes rust-lang#91803
    
    This fix also includes some drive-by changes, specifically:
    
    1. Don't suggest boxing when we have `-> dyn Trait` and are already returning `Box<T>` where `T: Trait` (before we always boxed the value).
    2. Suggestion applies even when the return type is a type alias (e.g. `type Foo = dyn Trait`). This does cause the suggestion to expand to the aliased type, but I think it's still beneficial.
    3. Split up the multipart suggestion because there's a 6-line max in the printed output...
    
    I am open to splitting out the above changes, if we just want to fix the ICE first.
    
    cc: `@terrarier2111` and rust-lang#92289
    Dylan-DPC committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    8baa470 View commit details
    Browse the repository at this point in the history