Skip to content

Commit 1bb0579

Browse files
committed
expand the documentation on PinBox
1 parent f9efd05 commit 1bb0579

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/liballoc/pin.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,15 @@ use core::task::{Context, Poll};
103103
use boxed::Box;
104104

105105
/// A pinned, heap allocated reference.
106+
///
107+
/// This type is similar to [`Box`], except that it pins its value,
108+
/// which prevents it from moving out of the reference, unless it implements [`Unpin`].
109+
///
110+
/// See the [module documentation] for furthur explaination on pinning.
111+
///
112+
/// [`Box`]: ../boxed/struct.Box.html
113+
/// [`Unpin`]: ../../core/marker/trait.Unpin.html
114+
/// [module documentation]: index.html
106115
#[unstable(feature = "pin", issue = "49150")]
107116
#[fundamental]
108117
#[repr(transparent)]

0 commit comments

Comments
 (0)