@@ -265,12 +265,13 @@ where
265
265
impl < T > Copy for Exclusive < T > where T : Sync + Copy { }
266
266
267
267
#[ unstable( feature = "exclusive_wrapper" , issue = "98407" ) ]
268
- impl < T > PartialEq for Exclusive < T >
268
+ impl < T , U > PartialEq < Exclusive < U > > for Exclusive < T >
269
269
where
270
- T : Sync + PartialEq + ?Sized ,
270
+ T : Sync + PartialEq < U > + ?Sized ,
271
+ U : Sync + ?Sized ,
271
272
{
272
273
#[ inline]
273
- fn eq ( & self , other : & Self ) -> bool {
274
+ fn eq ( & self , other : & Exclusive < U > ) -> bool {
274
275
self . inner == other. inner
275
276
}
276
277
}
@@ -293,12 +294,13 @@ where
293
294
}
294
295
295
296
#[ unstable( feature = "exclusive_wrapper" , issue = "98407" ) ]
296
- impl < T > PartialOrd for Exclusive < T >
297
+ impl < T , U > PartialOrd < Exclusive < U > > for Exclusive < T >
297
298
where
298
- T : Sync + PartialOrd + ?Sized ,
299
+ T : Sync + PartialOrd < U > + ?Sized ,
300
+ U : Sync + ?Sized ,
299
301
{
300
302
#[ inline]
301
- fn partial_cmp ( & self , other : & Exclusive < T > ) -> Option < Ordering > {
303
+ fn partial_cmp ( & self , other : & Exclusive < U > ) -> Option < Ordering > {
302
304
self . inner . partial_cmp ( & other. inner )
303
305
}
304
306
}
0 commit comments