@@ -132,7 +132,7 @@ pub mod marker {
132
132
/// (for example, `S<&'static int>` is a subtype of `S<&'a int>`
133
133
/// for some lifetime `'a`, but not the other way around).
134
134
#[ lang="covariant_type" ]
135
- #[ deriving( PartialEq , Clone ) ]
135
+ #[ deriving( Clone , PartialEq , Eq , PartialOrd , Ord ) ]
136
136
pub struct CovariantType < T > ;
137
137
138
138
/// A marker type whose type parameter `T` is considered to be
@@ -175,7 +175,7 @@ pub mod marker {
175
175
/// function requires arguments of type `T`, it must also accept
176
176
/// arguments of type `U`, hence such a conversion is safe.
177
177
#[ lang="contravariant_type" ]
178
- #[ deriving( PartialEq , Clone ) ]
178
+ #[ deriving( Clone , PartialEq , Eq , PartialOrd , Ord ) ]
179
179
pub struct ContravariantType < T > ;
180
180
181
181
/// A marker type whose type parameter `T` is considered to be
@@ -200,7 +200,7 @@ pub mod marker {
200
200
/// never written, but in fact `Cell` uses unsafe code to achieve
201
201
/// interior mutability.
202
202
#[ lang="invariant_type" ]
203
- #[ deriving( PartialEq , Clone ) ]
203
+ #[ deriving( Clone , PartialEq , Eq , PartialOrd , Ord ) ]
204
204
pub struct InvariantType < T > ;
205
205
206
206
/// As `CovariantType`, but for lifetime parameters. Using
@@ -220,7 +220,7 @@ pub mod marker {
220
220
/// For more information about variance, refer to this Wikipedia
221
221
/// article <http://en.wikipedia.org/wiki/Variance_%28computer_science%29>.
222
222
#[ lang="covariant_lifetime" ]
223
- #[ deriving( PartialEq , Clone ) ]
223
+ #[ deriving( Clone , PartialEq , Eq , PartialOrd , Ord ) ]
224
224
pub struct CovariantLifetime < ' a > ;
225
225
226
226
/// As `ContravariantType`, but for lifetime parameters. Using
@@ -236,7 +236,7 @@ pub mod marker {
236
236
/// For more information about variance, refer to this Wikipedia
237
237
/// article <http://en.wikipedia.org/wiki/Variance_%28computer_science%29>.
238
238
#[ lang="contravariant_lifetime" ]
239
- #[ deriving( PartialEq , Clone ) ]
239
+ #[ deriving( Clone , PartialEq , Eq , PartialOrd , Ord ) ]
240
240
pub struct ContravariantLifetime < ' a > ;
241
241
242
242
/// As `InvariantType`, but for lifetime parameters. Using
@@ -247,34 +247,34 @@ pub mod marker {
247
247
/// and this pointer is itself stored in an inherently mutable
248
248
/// location (such as a `Cell`).
249
249
#[ lang="invariant_lifetime" ]
250
- #[ deriving( PartialEq , Clone ) ]
250
+ #[ deriving( Clone , PartialEq , Eq , PartialOrd , Ord ) ]
251
251
pub struct InvariantLifetime < ' a > ;
252
252
253
253
/// A type which is considered "not sendable", meaning that it cannot
254
254
/// be safely sent between tasks, even if it is owned. This is
255
255
/// typically embedded in other types, such as `Gc`, to ensure that
256
256
/// their instances remain thread-local.
257
257
#[ lang="no_send_bound" ]
258
- #[ deriving( PartialEq , Clone ) ]
258
+ #[ deriving( Clone , PartialEq , Eq , PartialOrd , Ord ) ]
259
259
pub struct NoSend ;
260
260
261
261
/// A type which is considered "not POD", meaning that it is not
262
262
/// implicitly copyable. This is typically embedded in other types to
263
263
/// ensure that they are never copied, even if they lack a destructor.
264
264
#[ lang="no_copy_bound" ]
265
- #[ deriving( PartialEq , Clone ) ]
265
+ #[ deriving( Clone , PartialEq , Eq , PartialOrd , Ord ) ]
266
266
pub struct NoCopy ;
267
267
268
268
/// A type which is considered "not sync", meaning that
269
269
/// its contents are not threadsafe, hence they cannot be
270
270
/// shared between tasks.
271
271
#[ lang="no_sync_bound" ]
272
- #[ deriving( PartialEq , Clone ) ]
272
+ #[ deriving( Clone , PartialEq , Eq , PartialOrd , Ord ) ]
273
273
pub struct NoSync ;
274
274
275
275
/// A type which is considered managed by the GC. This is typically
276
276
/// embedded in other types.
277
277
#[ lang="managed_bound" ]
278
- #[ deriving( PartialEq , Clone ) ]
278
+ #[ deriving( Clone , PartialEq , Eq , PartialOrd , Ord ) ]
279
279
pub struct Managed ;
280
280
}
0 commit comments