about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiv Kaminer <nivkner@zoho.com>2018-08-14 19:25:08 +0300
committerNiv Kaminer <nivkner@zoho.com>2018-08-23 01:37:03 +0300
commit1bb05797c26b77f9541b03ac1c44c723b01959f5 (patch)
tree295484ecd55452fd091437133e62f5616b094fa8
parentf9efd0578a890d9441da468cc5eed6b9f2ed87df (diff)
downloadrust-1bb05797c26b77f9541b03ac1c44c723b01959f5.tar.gz
rust-1bb05797c26b77f9541b03ac1c44c723b01959f5.zip
expand the documentation on PinBox
-rw-r--r--src/liballoc/pin.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/liballoc/pin.rs b/src/liballoc/pin.rs
index 0ecf4ac0a69..92414f5555e 100644
--- a/src/liballoc/pin.rs
+++ b/src/liballoc/pin.rs
@@ -103,6 +103,15 @@ use core::task::{Context, Poll};
 use boxed::Box;
 
 /// A pinned, heap allocated reference.
+///
+/// This type is similar to [`Box`], except that it pins its value,
+/// which prevents it from moving out of the reference, unless it implements [`Unpin`].
+///
+/// See the [module documentation] for furthur explaination on pinning.
+///
+/// [`Box`]: ../boxed/struct.Box.html
+/// [`Unpin`]: ../../core/marker/trait.Unpin.html
+/// [module documentation]: index.html
 #[unstable(feature = "pin", issue = "49150")]
 #[fundamental]
 #[repr(transparent)]