diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-12-17 08:34:35 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-12-17 11:50:27 -0800 |
| commit | 67237a7917bfa58b3efbafde9b625bdefbd59408 (patch) | |
| tree | 6f8ff2d55d50a477c63e00569a98382594351019 | |
| parent | de0570de21007e1174f72e2af69fa836243658ca (diff) | |
| parent | f63784f4e279facc881c51451d5cd8315336585e (diff) | |
| download | rust-67237a7917bfa58b3efbafde9b625bdefbd59408.tar.gz rust-67237a7917bfa58b3efbafde9b625bdefbd59408.zip | |
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
| -rw-r--r-- | src/libcore/kinds.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libcore/kinds.rs b/src/libcore/kinds.rs index c0673c46142..69f65e23389 100644 --- a/src/libcore/kinds.rs +++ b/src/libcore/kinds.rs @@ -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 |
