Skip to content

Commit b754b8f

Browse files
committed
Expand note on mutable references
1 parent e9c9d1c commit b754b8f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/libcore/pin.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,10 @@
176176
//! i.e., an operation with type `fn(Pin<&Struct>) -> Pin<&Field>`? In a
177177
//! similar vein, when can a generic wrapper type (such as `Vec<T>`, `Box<T>`,
178178
//! or `RefCell<T>`) have an operation with type `fn(Pin<&Wrapper<T>>) ->
179-
//! Pin<&T>` (or similarly `fn(Pin<&mut Wrapper<T>>) -> Pin<&mut T>`)?
179+
//! Pin<&T>`?
180+
//!
181+
//! Note: For the entirety of this discussion, the same applies for mutable references as it
182+
//! does for shared references.
180183
//!
181184
//! Having a pinning projection for some field means that pinning is "structural":
182185
//! when the wrapper is pinned, the field must be considered pinned, too.

0 commit comments

Comments
 (0)