diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index c25f3eb8f17..f16a112b801 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -749,6 +749,9 @@ impl AsMut for Box { } } +#[unstable(feature = "pin", issue = "49150")] +impl Unpin for Box { } + #[unstable(feature = "generator_trait", issue = "43122")] impl Generator for Box where T: Generator + ?Sized diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index 4860daa11e2..488b9d32cf0 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -252,7 +252,7 @@ use core::fmt; use core::hash::{Hash, Hasher}; use core::intrinsics::abort; use core::marker; -use core::marker::{Unsize, PhantomData}; +use core::marker::{Unpin, Unsize, PhantomData}; use core::mem::{self, align_of_val, forget, size_of_val}; use core::ops::Deref; use core::ops::CoerceUnsized; @@ -1830,3 +1830,6 @@ impl AsRef for Rc { &**self } } + +#[unstable(feature = "pin", issue = "49150")] +impl Unpin for Box { } diff --git a/src/liballoc/sync.rs b/src/liballoc/sync.rs index 2cd7898f4c7..da94ef4a9c4 100644 --- a/src/liballoc/sync.rs +++ b/src/liballoc/sync.rs @@ -27,7 +27,7 @@ use core::mem::{self, align_of_val, size_of_val}; use core::ops::Deref; use core::ops::CoerceUnsized; use core::ptr::{self, NonNull}; -use core::marker::{Unsize, PhantomData}; +use core::marker::{Unpin, Unsize, PhantomData}; use core::hash::{Hash, Hasher}; use core::{isize, usize}; use core::convert::From; @@ -1942,3 +1942,6 @@ impl AsRef for Arc { &**self } } + +#[unstable(feature = "pin", issue = "49150")] +impl Unpin for Arc { }