@@ -265,12 +265,13 @@ where
265265impl < T > Copy for Exclusive < T > where T : Sync + Copy { }
266266
267267#[ unstable( feature = "exclusive_wrapper" , issue = "98407" ) ]
268- impl < T > PartialEq for Exclusive < T >
268+ impl < T , U > PartialEq < Exclusive < U > > for Exclusive < T >
269269where
270- T : Sync + PartialEq + ?Sized ,
270+ T : Sync + PartialEq < U > + ?Sized ,
271+ U : Sync + ?Sized ,
271272{
272273 #[ inline]
273- fn eq ( & self , other : & Self ) -> bool {
274+ fn eq ( & self , other : & Exclusive < U > ) -> bool {
274275 self . inner == other. inner
275276 }
276277}
@@ -293,12 +294,13 @@ where
293294}
294295
295296#[ unstable( feature = "exclusive_wrapper" , issue = "98407" ) ]
296- impl < T > PartialOrd for Exclusive < T >
297+ impl < T , U > PartialOrd < Exclusive < U > > for Exclusive < T >
297298where
298- T : Sync + PartialOrd + ?Sized ,
299+ T : Sync + PartialOrd < U > + ?Sized ,
300+ U : Sync + ?Sized ,
299301{
300302 #[ inline]
301- fn partial_cmp ( & self , other : & Exclusive < T > ) -> Option < Ordering > {
303+ fn partial_cmp ( & self , other : & Exclusive < U > ) -> Option < Ordering > {
302304 self . inner . partial_cmp ( & other. inner )
303305 }
304306}
0 commit comments