Remove [mut] syntax in pin docs#59900
Merged
bors merged 3 commits intorust-lang:masterfrom Apr 14, 2019
Merged
Conversation
Contributor
|
(rust_highfive has picked a reviewer for you, use r? to override) |
Contributor
Author
|
r? @Centril |
Contributor
|
So some precision is lost here... I'm not sure how I feel about that so I'm going to r? @RalfJung |
RalfJung
reviewed
Apr 12, 2019
src/libcore/pin.rs
Outdated
| //! One interesting question arises when considering the interaction of pinning and | ||
| //! the fields of a struct. When can a struct have a "pinning projection", i.e., | ||
| //! an operation with type `fn(Pin<&[mut] Struct>) -> Pin<&[mut] Field>`? | ||
| //! an operation with type `fn(Pin<&Struct>) -> Pin<&Field>`? |
Member
There was a problem hiding this comment.
Maybe add a parenthetical like ("or similarly with &mut")?
RalfJung
reviewed
Apr 12, 2019
src/libcore/pin.rs
Outdated
| //! i.e., an operation with type `fn(Pin<&Struct>) -> Pin<&Field>`? In a | ||
| //! similar vein, when can a generic wrapper type (such as `Vec<T>`, `Box<T>`, | ||
| //! or `RefCell<T>`) have an operation with type `fn(Pin<&Wrapper<T>>) -> | ||
| //! Pin<&T>` (or similarly `fn(Pin<&mut Wrapper<T>>) -> Pin<&mut T>`)? |
Member
There was a problem hiding this comment.
Now it may be read like only the Wrapper thing also applies to mut. That's why I was a bit more vague in my suggestion.
If you think that is too vague, what about instead just being explicit: "(Whenever shared references are used in this discussion, the same applies equally to mutable references.)"
Contributor
Author
|
Check this out @RalfJung |
Member
|
Thanks! @bors r+ rollup |
Collaborator
|
📌 Commit b754b8f has been approved by |
Centril
added a commit
to Centril/rust
that referenced
this pull request
Apr 14, 2019
…in-pin-docs, r=RalfJung Remove [mut] syntax in pin docs Resolves rust-lang#59832
Centril
added a commit
to Centril/rust
that referenced
this pull request
Apr 14, 2019
…in-pin-docs, r=RalfJung Remove [mut] syntax in pin docs Resolves rust-lang#59832
Centril
added a commit
to Centril/rust
that referenced
this pull request
Apr 14, 2019
…in-pin-docs, r=RalfJung Remove [mut] syntax in pin docs Resolves rust-lang#59832
bors
added a commit
that referenced
this pull request
Apr 14, 2019
Rollup of 7 pull requests Successful merges: - #59856 (update polonius-engine) - #59877 (HirIdify hir::Def) - #59896 (Remove duplicated redundant spans) - #59900 (Remove [mut] syntax in pin docs) - #59906 (Make BufWriter use get_mut instead of manipulating inner in Write implementation) - #59936 (Fix cross-crate visibility of fictive variant constructors) - #59957 (Add missing backtick to Symbol documentation.) Failed merges: r? @ghost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #59832