]> git.lizzy.rs Git - rust.git/blobdiff - src/libcore/kinds.rs
rollup merge of #20014: kballard/unsized-marker-type-params
[rust.git] / src / libcore / kinds.rs
index bf1a7ec299901030d4af1a2230b0e58c5438f751..b0f46e3d68c908a1850962274d83ba5007f03945 100644 (file)
@@ -235,11 +235,9 @@ fn clone(&self) -> InvariantType<T> { *self }
     /// For more information about variance, refer to this Wikipedia
     /// article <http://en.wikipedia.org/wiki/Variance_%28computer_science%29>.
     #[lang="covariant_lifetime"]
-    #[deriving(Clone, PartialEq, Eq, PartialOrd, Ord)]
+    #[deriving(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
     pub struct CovariantLifetime<'a>;
 
-    impl<'a> Copy for CovariantLifetime<'a> {}
-
     /// As `ContravariantType`, but for lifetime parameters. Using
     /// `ContravariantLifetime<'a>` indicates that it is ok to
     /// substitute a *shorter* lifetime for `'a` than the one you
@@ -253,11 +251,9 @@ impl<'a> Copy for CovariantLifetime<'a> {}
     /// For more information about variance, refer to this Wikipedia
     /// article <http://en.wikipedia.org/wiki/Variance_%28computer_science%29>.
     #[lang="contravariant_lifetime"]
-    #[deriving(Clone, PartialEq, Eq, PartialOrd, Ord)]
+    #[deriving(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
     pub struct ContravariantLifetime<'a>;
 
-    impl<'a> Copy for ContravariantLifetime<'a> {}
-
     /// As `InvariantType`, but for lifetime parameters. Using
     /// `InvariantLifetime<'a>` indicates that it is not ok to
     /// substitute any other lifetime for `'a` besides its original
@@ -266,11 +262,9 @@ impl<'a> Copy for ContravariantLifetime<'a> {}
     /// and this pointer is itself stored in an inherently mutable
     /// location (such as a `Cell`).
     #[lang="invariant_lifetime"]
-    #[deriving(Clone, PartialEq, Eq, PartialOrd, Ord)]
+    #[deriving(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
     pub struct InvariantLifetime<'a>;
 
-    impl<'a> Copy for InvariantLifetime<'a> {}
-
     /// A type which is considered "not sendable", meaning that it cannot
     /// be safely sent between tasks, even if it is owned. This is
     /// typically embedded in other types, such as `Gc`, to ensure that