Commit 6c43a64
committed
Fix ICE from projection cycle
Cycles in normalization can cause evaluations to change from Unknown to
Err. This means that some selection that were applicable no longer are.
To avoid this:
* Selection candidates that are known to be applicable are prefered
over candidates that are not.
* We don't ICE if a candidate is no longer applicable.1 parent 22e6b9c commit 6c43a64
File tree
3 files changed
+34
-20
lines changed- compiler/rustc_trait_selection/src/traits/select
- src/test/ui/associated-types
3 files changed
+34
-20
lines changedLines changed: 6 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
| 156 | + | |
| 157 | + | |
164 | 158 | | |
165 | 159 | | |
166 | 160 | | |
| |||
181 | 175 | | |
182 | 176 | | |
183 | 177 | | |
184 | | - | |
| 178 | + | |
185 | 179 | | |
186 | 180 | | |
187 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
| 521 | + | |
527 | 522 | | |
528 | 523 | | |
529 | 524 | | |
| |||
1382 | 1377 | | |
1383 | 1378 | | |
1384 | 1379 | | |
1385 | | - | |
| 1380 | + | |
1386 | 1381 | | |
1387 | | - | |
| 1382 | + | |
1388 | 1383 | | |
1389 | 1384 | | |
1390 | 1385 | | |
| |||
Lines changed: 25 additions & 0 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 | + | |
| 24 | + | |
| 25 | + | |
0 commit comments