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

Expand std::pin module docs and rename std::pin::Pinned to PhantomPinned #55992

Merged
merged 2 commits into from Dec 12, 2018

Conversation

Projects
None yet
9 participants
@cramertj
Member

cramertj commented Nov 15, 2018

cc #49150, #55766

r? @withoutboats

//!
//! Note that pinning and `Unpin` only affect the pointed-to type. For example, whether
//! or not `Box<T>` is `Unpin` has no affect on the behavior of `Pin<Box<T>>`. Similarly,
//! `Pin<Box<T>>` and `Pin<&mut T>` are always `Unpin` themselves, even though the

This comment has been minimized.

@jonhoo

jonhoo Nov 16, 2018

Contributor

Shouldn't this be Box<T> and &mut T? We have an impl Unpin for Box<T> where T: !Unpin, right?

This comment has been minimized.

@cramertj

cramertj Nov 16, 2018

Member

Those are also Unpin, but I was specifically referring to the Pin-wrapped types to clarify that Pin does not make something !Unpin.

Show resolved Hide resolved src/libcore/pin.rs Outdated
Show resolved Hide resolved src/libcore/pin.rs Outdated

@cramertj cramertj force-pushed the cramertj:pin-docs branch from a2d4315 to f90be53 Nov 19, 2018

//! changing the location of the underlying data, [`Pin`] prohibits accessing the
//! underlying pointer type (the `&mut` or `Box`) directly, and provides its own set of
//! APIs for accessing and using the value. [`Pin`] also guarantees that no other
//! functions will move the pointed-to value. This allows for the creation of

This comment has been minimized.

@jonhoo

jonhoo Nov 20, 2018

Contributor

I think we may want to say "no later code", or something along those lines, instead of "other functions". The contract around Pin talks about what cannot happen "in the future", but the current text doesn't currently say that.

@TimNN

This comment has been minimized.

Contributor

TimNN commented Nov 27, 2018

Ping from triage @withoutboats: This PR requires your review.

@TimNN

This comment has been minimized.

Contributor

TimNN commented Dec 4, 2018

Ping from triage @withoutboats / @rust-lang/libs: This PR requires your review.

@bors

This comment has been minimized.

Contributor

bors commented Dec 8, 2018

☔️ The latest upstream changes (presumably #56578) made this pull request unmergeable. Please resolve the merge conflicts.

@cramertj

This comment has been minimized.

Member

cramertj commented Dec 10, 2018

Ping @rust-lang/libs can one of y'all make a decision here? I don't think there's much to be said that hasn't been already on the stabilization thread.

@alexcrichton alexcrichton added the T-libs label Dec 10, 2018

@alexcrichton

This comment has been minimized.

Member

alexcrichton commented Dec 10, 2018

@rfcbot fcp merge

To confirm we're all on board with the renaming, but I suspect this won't take long

@rfcbot

This comment has been minimized.

rfcbot commented Dec 10, 2018

Team member @alexcrichton has proposed to merge this. The next step is review by the rest of the tagged teams:

No concerns currently listed.

Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot

This comment has been minimized.

rfcbot commented Dec 12, 2018

🔔 This is now entering its final comment period, as per the review above. 🔔

@alexcrichton

This comment has been minimized.

Member

alexcrichton commented Dec 12, 2018

Ok great! @cramertj want to rebase this and I'll r+?

@cramertj cramertj force-pushed the cramertj:pin-docs branch from f90be53 to 709b751 Dec 12, 2018

@cramertj

This comment has been minimized.

Member

cramertj commented Dec 12, 2018

@alexcrichton

This comment has been minimized.

Member

alexcrichton commented Dec 12, 2018

@bors: r+

@bors

This comment has been minimized.

Contributor

bors commented Dec 12, 2018

📌 Commit 709b751 has been approved by alexcrichton

@bors

This comment has been minimized.

Contributor

bors commented Dec 12, 2018

⌛️ Testing commit 709b751 with merge 0076f58...

bors added a commit that referenced this pull request Dec 12, 2018

Auto merge of #55992 - cramertj:pin-docs, r=alexcrichton
Expand std::pin module docs and rename std::pin::Pinned to PhantomPinned

cc #49150, #55766

r? @withoutboats
@bors

This comment has been minimized.

Contributor

bors commented Dec 12, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 0076f58 to master...

@bors bors merged commit 709b751 into rust-lang:master Dec 12, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

@cramertj cramertj deleted the cramertj:pin-docs branch Dec 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment