about summary refs log tree commit diff
path: root/src/liballoc/sync.rs
diff options
context:
space:
mode:
authorWithout Boats <boats@mozilla.com>2018-09-01 01:54:59 +0200
committerWithout Boats <boats@mozilla.com>2018-09-01 01:54:59 +0200
commitc3bdd760472583f45dca1d0c9c16012f84d3fa15 (patch)
treed384e0713c2d185ec1410ccebc372925e3d2f38c /src/liballoc/sync.rs
parentaaa170bebe31d03e2eea14e8cb06dc2e8891216b (diff)
downloadrust-c3bdd760472583f45dca1d0c9c16012f84d3fa15.tar.gz
rust-c3bdd760472583f45dca1d0c9c16012f84d3fa15.zip
Implement Unpin for Box, Rc, and Arc
Diffstat (limited to 'src/liballoc/sync.rs')
-rw-r--r--src/liballoc/sync.rs5
1 files changed, 4 insertions, 1 deletions
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<T: ?Sized> AsRef<T> for Arc<T> {
         &**self
     }
 }
+
+#[unstable(feature = "pin", issue = "49150")]
+impl<T: ?Sized> Unpin for Arc<T> { }