diff options
| author | Chris Gregory <czipperz@gmail.com> | 2019-04-13 15:54:57 -0500 |
|---|---|---|
| committer | Chris Gregory <czipperz@gmail.com> | 2019-04-13 15:54:57 -0500 |
| commit | b754b8fb8eaa580753ea3f7bc52fa221cef2a9fe (patch) | |
| tree | 72ec6bdd3895b9be36a6844a3cce562568e3a10e /src | |
| parent | e9c9d1c305488eb1125d6a10367c81a5c411039c (diff) | |
| download | rust-b754b8fb8eaa580753ea3f7bc52fa221cef2a9fe.tar.gz rust-b754b8fb8eaa580753ea3f7bc52fa221cef2a9fe.zip | |
Expand note on mutable references
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/pin.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libcore/pin.rs b/src/libcore/pin.rs index e1fe0044cc4..d1ebe5ed72a 100644 --- a/src/libcore/pin.rs +++ b/src/libcore/pin.rs @@ -176,7 +176,10 @@ //! 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>`)? +//! Pin<&T>`? +//! +//! Note: For the entirety of this discussion, the same applies for mutable references as it +//! does for shared references. //! //! Having a pinning projection for some field means that pinning is "structural": //! when the wrapper is pinned, the field must be considered pinned, too. |
