rollup merge of #19860: japaric/copy-markers

Necessary to implement `Copy` on structs like this one:

``` rust
struct Slice<'a, T> {
    _contravariant: marker::ContravariantLifetime<'a>,
    _nosend: marker::NoSend,
    data: *const T,
    length: uint,
}
```

r? @alexcrichton
This commit is contained in:
Alex Crichton 2014-12-17 08:34:35 -08:00
commit 67237a7917

View File

@ -266,8 +266,7 @@ pub mod marker {
/// typically embedded in other types, such as `Gc`, to ensure that
/// their instances remain thread-local.
#[lang="no_send_bound"]
#[deriving(Clone, PartialEq, Eq, PartialOrd, Ord)]
#[allow(missing_copy_implementations)]
#[deriving(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
pub struct NoSend;
/// A type which is considered "not POD", meaning that it is not
@ -282,8 +281,7 @@ pub mod marker {
/// its contents are not threadsafe, hence they cannot be
/// shared between tasks.
#[lang="no_sync_bound"]
#[deriving(Clone, PartialEq, Eq, PartialOrd, Ord)]
#[allow(missing_copy_implementations)]
#[deriving(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
pub struct NoSync;
/// A type which is considered managed by the GC. This is typically