Uh oh!
There was an error while loading. Please reload this page.
Remove [mut] syntax in pin docs - #59900
Conversation
rust-highfive
commented
Apr 12, 2019
(rust_highfive has picked a reviewer for you, use r? to override) |
czipperz
commented
Apr 12, 2019
r? @Centril |
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 |
| //! 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>`? |
There was a problem hiding this comment.
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>`)? |
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.)"
czipperz
commented
Apr 13, 2019
Check this out @RalfJung |
RalfJung
commented
Apr 14, 2019
Thanks! @bors r+ rollup |
bors
commented
Apr 14, 2019
📌 Commit b754b8f has been approved by |
…in-pin-docs, r=RalfJung Remove [mut] syntax in pin docs Resolvesrust-lang#59832
…in-pin-docs, r=RalfJung Remove [mut] syntax in pin docs Resolvesrust-lang#59832
…in-pin-docs, r=RalfJung Remove [mut] syntax in pin docs Resolvesrust-lang#59832
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
Resolves#59832