Commit eac7da1
committed
trait_sel: sizedness goals prefer alias candidates
Following the changes to lowering, sizedness supertraits are now
elaborated on associated type bounds.
In existing code where an item bound was used to prove a predicate,
this elaboration can result in a param candidate being present which
will now take precedence over the projection candidate. Evaluation of
the param candidate results in types being equated and region
constraints being created that would not have with the projection
candidate - sometimes emitting an error as a consequence!
For sizedness predicates, now prefer non-param candidates if any
exist.
So that the `issue-93262.rs` test continued to pass, this required
removing normalisation of the predicates of projections when
confirming projection candidates which permits more uses of GATs and
changes the output of yet more tests.1 parent f16fddc commit eac7da1
File tree
16 files changed
+156
-125
lines changed- compiler
- rustc_middle/src/ty
- rustc_next_trait_solver/src/solve
- rustc_trait_selection/src/traits/select
- rustc_type_ir/src
- tests/ui
- dyn-compatibility
- generic-associated-types
- bugs
- higher-ranked/trait-bounds/normalize-under-binder
- nll
- sized-hierarchy
16 files changed
+156
-125
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
496 | 500 | | |
497 | 501 | | |
498 | 502 | | |
| |||
1645 | 1649 | | |
1646 | 1650 | | |
1647 | 1651 | | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
1648 | 1656 | | |
1649 | 1657 | | |
1650 | 1658 | | |
| |||
Lines changed: 29 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1343 | 1343 | | |
1344 | 1344 | | |
1345 | 1345 | | |
| 1346 | + | |
1346 | 1347 | | |
1347 | 1348 | | |
1348 | 1349 | | |
| |||
1368 | 1369 | | |
1369 | 1370 | | |
1370 | 1371 | | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
1371 | 1392 | | |
1372 | 1393 | | |
1373 | 1394 | | |
| |||
1386 | 1407 | | |
1387 | 1408 | | |
1388 | 1409 | | |
1389 | | - | |
1390 | | - | |
1391 | | - | |
1392 | | - | |
1393 | | - | |
1394 | | - | |
1395 | | - | |
1396 | | - | |
1397 | | - | |
1398 | | - | |
1399 | | - | |
| 1410 | + | |
| 1411 | + | |
1400 | 1412 | | |
1401 | 1413 | | |
1402 | 1414 | | |
| |||
1431 | 1443 | | |
1432 | 1444 | | |
1433 | 1445 | | |
1434 | | - | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
1435 | 1452 | | |
1436 | 1453 | | |
1437 | 1454 | | |
| |||
Lines changed: 0 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
151 | 149 | | |
152 | 150 | | |
153 | 151 | | |
| |||
196 | 194 | | |
197 | 195 | | |
198 | 196 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | 197 | | |
222 | 198 | | |
223 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
488 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
489 | 497 | | |
490 | 498 | | |
491 | 499 | | |
| |||
1826 | 1834 | | |
1827 | 1835 | | |
1828 | 1836 | | |
| 1837 | + | |
1829 | 1838 | | |
1830 | 1839 | | |
1831 | 1840 | | |
| |||
1879 | 1888 | | |
1880 | 1889 | | |
1881 | 1890 | | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
1882 | 1904 | | |
1883 | 1905 | | |
1884 | 1906 | | |
| |||
1912 | 1934 | | |
1913 | 1935 | | |
1914 | 1936 | | |
1915 | | - | |
1916 | | - | |
1917 | | - | |
1918 | | - | |
1919 | 1937 | | |
1920 | 1938 | | |
1921 | 1939 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| 303 | + | |
| 304 | + | |
303 | 305 | | |
304 | 306 | | |
305 | 307 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
Lines changed: 49 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
| 27 | + | |
| 28 | + | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
32 | 47 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
37 | 55 | | |
38 | | - | |
39 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
40 | 78 | | |
41 | | - | |
| 79 | + | |
42 | 80 | | |
43 | | - | |
44 | | - | |
| 81 | + | |
Lines changed: 1 addition & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | 1 | | |
24 | 2 | | |
25 | 3 | | |
| |||
33 | 11 | | |
34 | 12 | | |
35 | 13 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 14 | + | |
48 | 15 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | 19 | | |
27 | 20 | | |
28 | 21 | | |
This file was deleted.
0 commit comments