diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index d4a87b13f04d..77db165bcbde 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -607,6 +607,16 @@ unsafe impl<'a, T: ?Sized> Freeze for &'a mut T {} #[unstable(feature = "pin", issue = "49150")] pub auto trait Unpin {} +/// A type which does not implement `Unpin`. +/// +/// If a type contains a `Pinned`, it will not implement `Unpin` by default. +#[unstable(feature = "pin", issue = "49150")] +#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] +pub struct Pinned; + +#[unstable(feature = "pin", issue = "49150")] +impl !Unpin for Pinned {} + /// Implementations of `Copy` for primitive types. /// /// Implementations that cannot be described in Rust