Skip to content

Remove [mut] syntax in pin docs - #59900

Merged
bors merged 3 commits into
rust-lang:masterfrom
czipperz:remove-bracket-mut-syntax-in-pin-docs
Apr 14, 2019
Merged

Remove [mut] syntax in pin docs#59900
bors merged 3 commits into
rust-lang:masterfrom
czipperz:remove-bracket-mut-syntax-in-pin-docs

Conversation

@czipperz

Copy link
Copy Markdown
Contributor

Resolves#59832

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @withoutboats

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

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

Copy link
Copy Markdown
ContributorAuthor

r? @Centril

@jonas-schievinkjonas-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
Copy Markdown
Contributor

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

r? @RalfJung

Comment threadsrc/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>`?

Copy link
Copy Markdown
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")?

Comment threadsrc/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>`)?

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

Check this out @RalfJung

@RalfJung

Copy link
Copy Markdown
Member

Thanks!

@bors r+ rollup

@bors

bors commented Apr 14, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit b754b8f has been approved by RalfJung

@borsbors 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
Resolvesrust-lang#59832
@CentrilCentril mentioned this pull request 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
Resolvesrust-lang#59832
@CentrilCentril mentioned this pull request 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
Resolvesrust-lang#59832
@CentrilCentril mentioned this pull request Apr 14, 2019
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:masterApr 14, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsS-waiting-on-borsStatus: 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

@czipperz@rust-highfive@Centril@RalfJung@bors@jonas-schievink@withoutboats