@@ -24,9 +24,13 @@ use ops::{Deref, DerefMut, CoerceUnsized};
24
24
25
25
/// A pinned reference.
26
26
///
27
- /// A pinned reference is a lot like a mutable reference, except that it is not
28
- /// safe to move a value out of a pinned reference unless the type of that
29
- /// value implements the `Unpin` trait.
27
+ /// This type is similar to a mutable reference, except that it pins its value,
28
+ /// which prevents it from moving out of the reference, unless it implements [`Unpin`].
29
+ ///
30
+ /// See the [`pin` module] documentation for furthur explanation on pinning.
31
+ ///
32
+ /// [`Unpin`]: ../marker/trait.Unpin.html
33
+ /// [`pin` module]: ../../alloc/pin/index.html
30
34
#[ unstable( feature = "pin" , issue = "49150" ) ]
31
35
#[ fundamental]
32
36
pub struct PinMut < ' a , T : ?Sized + ' a > {
@@ -56,7 +60,7 @@ impl<'a, T: ?Sized> PinMut<'a, T> {
56
60
/// may or may not implement `Unpin`.
57
61
///
58
62
/// This constructor is unsafe because we do not know what will happen with
59
- /// that data after the reference ends. If you cannot guarantee that the
63
+ /// that data after the lifetime of the reference ends. If you cannot guarantee that the
60
64
/// data will never move again, calling this constructor is invalid.
61
65
#[ unstable( feature = "pin" , issue = "49150" ) ]
62
66
pub unsafe fn new_unchecked ( reference : & ' a mut T ) -> PinMut < ' a , T > {
0 commit comments