about summary refs log tree commit diff
path: root/src/liballoc/boxed.rs
diff options
context:
space:
mode:
authorTaylor Cramer <cramertj@google.com>2018-12-18 10:25:02 -0800
committerTaylor Cramer <cramertj@google.com>2018-12-21 20:42:50 -0800
commit684fe9a6b2b39e6b8a1089eecd0334ef484fcc56 (patch)
tree2bc0946e85c1264b3c63b198c705ce143905e594 /src/liballoc/boxed.rs
parent3005bf360d11dbda5d32b9b75647df07bfa1372d (diff)
downloadrust-684fe9a6b2b39e6b8a1089eecd0334ef484fcc56.tar.gz
rust-684fe9a6b2b39e6b8a1089eecd0334ef484fcc56.zip
Rename Box/Arc/Rc::pinned to ::pin
Diffstat (limited to 'src/liballoc/boxed.rs')
-rw-r--r--src/liballoc/boxed.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index 6a63bee2795..7438f3e6c9d 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -111,9 +111,11 @@ impl<T> Box<T> {
         box x
     }
 
+    /// Constructs a new `Pin<Box<T>>`. If `T` does not implement `Unpin`, then
+    /// `x` will be pinned in memory and unable to be moved.
     #[stable(feature = "pin", since = "1.33.0")]
     #[inline(always)]
-    pub fn pinned(x: T) -> Pin<Box<T>> {
+    pub fn pin(x: T) -> Pin<Box<T>> {
         (box x).into()
     }
 }