about summary refs log tree commit diff
path: root/src/liballoc/sync.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-12-24 07:26:19 +0000
committerbors <bors@rust-lang.org>2018-12-24 07:26:19 +0000
commit94bf2c15eb3d072e92855a605783a29920df9e46 (patch)
treec54866741b6c39b4ddce1f30ae136075ec936bc5 /src/liballoc/sync.rs
parente16928082aa2d66a4498132572b69156b94b25f1 (diff)
parentdff3e41914905eae0326c00de0dd9befc9d9ae83 (diff)
downloadrust-94bf2c15eb3d072e92855a605783a29920df9e46.tar.gz
rust-94bf2c15eb3d072e92855a605783a29920df9e46.zip
Auto merge of #57087 - Centril:rollup, r=Centril
Rollup of 14 pull requests

Successful merges:

 - #56188 (enum type instead of variant suggestion unification )
 - #56342 (Improve docs for collecting into `Option`s)
 - #56916 (Fix mutable references in `static mut`)
 - #56917 (Simplify MIR generation for logical operations)
 - #56939 (Pin stabilization)
 - #56953 (Mark tuple structs as live if their constructors are used)
 - #56964 (Remove `TokenStream::JointTree`.)
 - #56966 (Correct strings for raw pointer deref and array access suggestions)
 - #57020 (Point to cause of `fn` expected return type)
 - #57032 (fix deprecation warnings in liballoc benches)
 - #57053 (Fix alignment for array indexing)
 - #57062 (Fix a comment)
 - #57067 (Stabilize min_const_unsafe_fn in 1.33)
 - #57078 (Ignore two tests on s390x)

Failed merges:

r? @ghost
Diffstat (limited to 'src/liballoc/sync.rs')
-rw-r--r--src/liballoc/sync.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/liballoc/sync.rs b/src/liballoc/sync.rs
index 948c36117a3..7b8afb1943c 100644
--- a/src/liballoc/sync.rs
+++ b/src/liballoc/sync.rs
@@ -303,8 +303,10 @@ impl<T> Arc<T> {
         Arc { ptr: Box::into_raw_non_null(x), phantom: PhantomData }
     }
 
-    #[unstable(feature = "pin", issue = "49150")]
-    pub fn pinned(data: T) -> Pin<Arc<T>> {
+    /// Constructs a new `Pin<Arc<T>>`. If `T` does not implement `Unpin`, then
+    /// `data` will be pinned in memory and unable to be moved.
+    #[stable(feature = "pin", since = "1.33.0")]
+    pub fn pin(data: T) -> Pin<Arc<T>> {
         unsafe { Pin::new_unchecked(Arc::new(data)) }
     }
 
@@ -2050,5 +2052,5 @@ impl<T: ?Sized> AsRef<T> for Arc<T> {
     }
 }
 
-#[unstable(feature = "pin", issue = "49150")]
+#[stable(feature = "pin", since = "1.33.0")]
 impl<T: ?Sized> Unpin for Arc<T> { }