Skip to content

Commit 67237a7

Browse files
committed
rollup merge of rust-lang#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
2 parents de0570d + f63784f commit 67237a7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/libcore/kinds.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,7 @@ pub mod marker {
266266
/// typically embedded in other types, such as `Gc`, to ensure that
267267
/// their instances remain thread-local.
268268
#[lang="no_send_bound"]
269-
#[deriving(Clone, PartialEq, Eq, PartialOrd, Ord)]
270-
#[allow(missing_copy_implementations)]
269+
#[deriving(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
271270
pub struct NoSend;
272271

273272
/// A type which is considered "not POD", meaning that it is not
@@ -282,8 +281,7 @@ pub mod marker {
282281
/// its contents are not threadsafe, hence they cannot be
283282
/// shared between tasks.
284283
#[lang="no_sync_bound"]
285-
#[deriving(Clone, PartialEq, Eq, PartialOrd, Ord)]
286-
#[allow(missing_copy_implementations)]
284+
#[deriving(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
287285
pub struct NoSync;
288286

289287
/// A type which is considered managed by the GC. This is typically

0 commit comments

Comments
 (0)