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

Remove P: Unpin bound on impl Future for Pin #81363

Merged
merged 4 commits into from
Jul 29, 2021

Commits on Mar 28, 2021

  1. Remove P: Unpin bound on impl Future for Pin

    The `Unpin` bound was originally added in rust-lang#56939 following the
    recommendation of @withoutboats in
    rust-lang#55766 (comment)
    
    That comment does not give explicit justification for why the bound
    should be added. The relevant context was:
    
    > [ ] Remove `impl<P> Unpin for Pin<P>`
    >
    > This impl is not justified by our standard justification for unpin
    > impls: there is no pointer direction between `Pin<P>` and `P`. Its
    > usefulness is covered by the impls for pointers themselves.
    >
    > This futures impl (link to the impl changed in this PR) will need to
    > change to add a `P: Unpin` bound.
    
    The decision to remove the unconditional impl of `Unpin for Pin` is
    sound (these days there is just an auto-impl for when `P: Unpin`). But,
    I think the decision to also add the `Unpin` bound for `impl Future` may
    have been unnecessary. Or if that's not the case, I'd be very interested
    to have the argument for why written down somewhere. The bound _appears_
    to not be needed, since the presence of a `Pin<P>` should indicate that
    it's safe to project to `Pin<&mut P::Target>` just like for
    `Pin::as_mut`.
    jonhoo committed Mar 28, 2021
    Configuration menu
    Copy the full SHA
    3b2b5b2 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2021

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

Commits on Jun 16, 2021

  1. Update library/core/src/pin.rs

    Co-authored-by: Ralf Jung <post@ralfj.de>
    jonhoo and RalfJung committed Jun 16, 2021
    Configuration menu
    Copy the full SHA
    b5e5a18 View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2021

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