@@ -1311,39 +1311,56 @@ impl Clone for Box<str> {
1311
1311
}
1312
1312
1313
1313
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1314
- impl < T : ?Sized + PartialEq , A : Allocator > PartialEq for Box < T , A > {
1314
+ impl < T , A1 , A2 > PartialEq < Box < T , A2 > > for Box < T , A1 >
1315
+ where
1316
+ T : ?Sized + PartialEq ,
1317
+ A1 : Allocator ,
1318
+ A2 : Allocator ,
1319
+ {
1315
1320
#[ inline]
1316
- fn eq ( & self , other : & Self ) -> bool {
1321
+ fn eq ( & self , other : & Box < T , A2 > ) -> bool {
1317
1322
PartialEq :: eq ( & * * self , & * * other)
1318
1323
}
1324
+
1319
1325
#[ inline]
1320
- fn ne ( & self , other : & Self ) -> bool {
1326
+ fn ne ( & self , other : & Box < T , A2 > ) -> bool {
1321
1327
PartialEq :: ne ( & * * self , & * * other)
1322
1328
}
1323
1329
}
1330
+
1324
1331
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1325
- impl < T : ?Sized + PartialOrd , A : Allocator > PartialOrd for Box < T , A > {
1332
+ impl < T , A1 , A2 > PartialOrd < Box < T , A2 > > for Box < T , A1 >
1333
+ where
1334
+ T : ?Sized + PartialOrd ,
1335
+ A1 : Allocator ,
1336
+ A2 : Allocator ,
1337
+ {
1326
1338
#[ inline]
1327
- fn partial_cmp ( & self , other : & Self ) -> Option < Ordering > {
1339
+ fn partial_cmp ( & self , other : & Box < T , A2 > ) -> Option < Ordering > {
1328
1340
PartialOrd :: partial_cmp ( & * * self , & * * other)
1329
1341
}
1342
+
1330
1343
#[ inline]
1331
- fn lt ( & self , other : & Self ) -> bool {
1344
+ fn lt ( & self , other : & Box < T , A2 > ) -> bool {
1332
1345
PartialOrd :: lt ( & * * self , & * * other)
1333
1346
}
1347
+
1334
1348
#[ inline]
1335
- fn le ( & self , other : & Self ) -> bool {
1349
+ fn le ( & self , other : & Box < T , A2 > ) -> bool {
1336
1350
PartialOrd :: le ( & * * self , & * * other)
1337
1351
}
1352
+
1338
1353
#[ inline]
1339
- fn ge ( & self , other : & Self ) -> bool {
1354
+ fn ge ( & self , other : & Box < T , A2 > ) -> bool {
1340
1355
PartialOrd :: ge ( & * * self , & * * other)
1341
1356
}
1357
+
1342
1358
#[ inline]
1343
- fn gt ( & self , other : & Self ) -> bool {
1359
+ fn gt ( & self , other : & Box < T , A2 > ) -> bool {
1344
1360
PartialOrd :: gt ( & * * self , & * * other)
1345
1361
}
1346
1362
}
1363
+
1347
1364
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1348
1365
impl < T : ?Sized + Ord , A : Allocator > Ord for Box < T , A > {
1349
1366
#[ inline]
0 commit comments