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 [mut] syntax in pin docs #59900

Merged
merged 3 commits into from
Apr 14, 2019

Conversation

czipperz
Copy link
Contributor

Resolves #59832

@rust-highfive
Copy link
Collaborator

r? @withoutboats

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 12, 2019
@czipperz
Copy link
Contributor Author

r? @Centril

@jonas-schievink jonas-schievink added the A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools label Apr 12, 2019
@Centril
Copy link
Contributor

Centril commented Apr 12, 2019

So some precision is lost here... I'm not sure how I feel about that so I'm going to

r? @RalfJung

@rust-highfive rust-highfive assigned RalfJung and unassigned Centril Apr 12, 2019
@@ -173,13 +173,13 @@
//!
//! 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>`?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a parenthetical like ("or similarly with &mut")?

//! 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>`)?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.)"

@czipperz
Copy link
Contributor Author

Check this out @RalfJung

@RalfJung
Copy link
Member

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 14, 2019

📌 Commit b754b8f has been approved by RalfJung

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 14, 2019
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
@bors bors merged commit b754b8f into rust-lang:master Apr 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

std docs: strange notation in std::pin docs
7 participants