Commit 448d2a8
authored
Rollup merge of rust-lang#112628 - gootorov:box_alloc_partialeq, r=joshtriplett
Allow comparing `Box`es with different allocators
Currently, comparing `Box`es over different allocators is not allowed:
```Rust
error[E0308]: mismatched types
--> library/alloc/tests/boxed.rs:22:20
|
22 | assert_eq!(b1, b2);
| ^^ expected `Box<{integer}, ConstAllocator>`, found `Box<{integer}, AnotherAllocator>`
|
= note: expected struct `Box<{integer}, ConstAllocator>`
found struct `Box<{integer}, AnotherAllocator>`
For more information about this error, try `rustc --explain E0308`.
error: could not compile `alloc` (test "collectionstests") due to previous error
```
This PR lifts this limitation1 file changed
+26
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1319 | 1319 | | |
1320 | 1320 | | |
1321 | 1321 | | |
1322 | | - | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
1323 | 1328 | | |
1324 | | - | |
| 1329 | + | |
1325 | 1330 | | |
1326 | 1331 | | |
| 1332 | + | |
1327 | 1333 | | |
1328 | | - | |
| 1334 | + | |
1329 | 1335 | | |
1330 | 1336 | | |
1331 | 1337 | | |
| 1338 | + | |
1332 | 1339 | | |
1333 | | - | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
1334 | 1346 | | |
1335 | | - | |
| 1347 | + | |
1336 | 1348 | | |
1337 | 1349 | | |
| 1350 | + | |
1338 | 1351 | | |
1339 | | - | |
| 1352 | + | |
1340 | 1353 | | |
1341 | 1354 | | |
| 1355 | + | |
1342 | 1356 | | |
1343 | | - | |
| 1357 | + | |
1344 | 1358 | | |
1345 | 1359 | | |
| 1360 | + | |
1346 | 1361 | | |
1347 | | - | |
| 1362 | + | |
1348 | 1363 | | |
1349 | 1364 | | |
| 1365 | + | |
1350 | 1366 | | |
1351 | | - | |
| 1367 | + | |
1352 | 1368 | | |
1353 | 1369 | | |
1354 | 1370 | | |
| 1371 | + | |
1355 | 1372 | | |
1356 | 1373 | | |
1357 | 1374 | | |
| |||
0 commit comments