Commit 71bad87
authored
Rollup merge of rust-lang#107489 - compiler-errors:non_lifetime_binders, r=cjgillot
Implement partial support for non-lifetime binders
This implements support for non-lifetime binders. It's pretty useless currently, but I wanted to put this up so the implementation can be discussed.
Specifically, this piggybacks off of the late-bound lifetime collection code in `rustc_hir_typeck::collect::lifetimes`. This seems like a necessary step given the fact we don't resolve late-bound regions until this point, and binders are sometimes merged.
Q: I'm not sure if I should go along this route, or try to modify the earlier nameres code to compute the right bound var indices for type and const binders eagerly... If so, I'll need to rename all these queries to something more appropriate (I've done this for `resolve_lifetime::Region` -> `resolve_lifetime::ResolvedArg`)
cc rust-lang/types-team#81
r? `@ghost`File tree
48 files changed
+709
-343
lines changed- compiler
- rustc_ast_passes/src
- rustc_attr/src
- rustc_feature/src
- rustc_hir_analysis/src
- astconv
- collect
- rustc_hir_typeck/src/fn_ctxt
- rustc_infer/src/infer/error_reporting/nice_region_error
- rustc_lint/src
- rustc_metadata/src/rmeta
- rustc_middle/src
- middle
- query
- ty
- rustc_mir_transform/src
- rustc_passes/src
- rustc_privacy/src
- rustc_resolve/src
- rustc_session/src
- rustc_span/src
- rustc_trait_selection/src/traits
- error_reporting
- select
- src
- librustdoc/clean
- tools/clippy/clippy_lints/src
- tests/ui
- closures/binder
- conditional-compilation
- feature-gates
- higher-rank-trait-bounds
- parser
- traits/non_lifetime_binders
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
48 files changed
+709
-343
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | 297 | | |
319 | 298 | | |
320 | 299 | | |
| |||
745 | 724 | | |
746 | 725 | | |
747 | 726 | | |
748 | | - | |
749 | 727 | | |
750 | 728 | | |
751 | 729 | | |
| |||
1318 | 1296 | | |
1319 | 1297 | | |
1320 | 1298 | | |
1321 | | - | |
1322 | | - | |
1323 | | - | |
1324 | 1299 | | |
1325 | 1300 | | |
1326 | 1301 | | |
| |||
1396 | 1371 | | |
1397 | 1372 | | |
1398 | 1373 | | |
1399 | | - | |
1400 | | - | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
1404 | 1374 | | |
1405 | 1375 | | |
1406 | 1376 | | |
| |||
1437 | 1407 | | |
1438 | 1408 | | |
1439 | 1409 | | |
1440 | | - | |
1441 | | - | |
1442 | | - | |
1443 | | - | |
1444 | 1410 | | |
1445 | 1411 | | |
1446 | 1412 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
139 | 169 | | |
140 | 170 | | |
141 | 171 | | |
| |||
147 | 177 | | |
148 | 178 | | |
149 | 179 | | |
150 | | - | |
| 180 | + | |
151 | 181 | | |
152 | 182 | | |
153 | 183 | | |
| |||
306 | 336 | | |
307 | 337 | | |
308 | 338 | | |
| 339 | + | |
309 | 340 | | |
310 | 341 | | |
311 | 342 | | |
| |||
318 | 349 | | |
319 | 350 | | |
320 | 351 | | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
321 | 365 | | |
322 | 366 | | |
323 | 367 | | |
| |||
437 | 481 | | |
438 | 482 | | |
439 | 483 | | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
440 | 489 | | |
441 | 490 | | |
442 | 491 | | |
443 | 492 | | |
444 | 493 | | |
445 | 494 | | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
446 | 499 | | |
447 | 500 | | |
448 | 501 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
731 | 731 | | |
732 | 732 | | |
733 | 733 | | |
734 | | - | |
| 734 | + | |
735 | 735 | | |
736 | 736 | | |
737 | 737 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
| 476 | + | |
| 477 | + | |
476 | 478 | | |
477 | 479 | | |
478 | 480 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
229 | | - | |
| 228 | + | |
| 229 | + | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| |||
1604 | 1604 | | |
1605 | 1605 | | |
1606 | 1606 | | |
1607 | | - | |
| 1607 | + | |
1608 | 1608 | | |
1609 | 1609 | | |
1610 | 1610 | | |
| |||
2598 | 2598 | | |
2599 | 2599 | | |
2600 | 2600 | | |
| 2601 | + | |
2601 | 2602 | | |
2602 | 2603 | | |
2603 | 2604 | | |
| |||
2661 | 2662 | | |
2662 | 2663 | | |
2663 | 2664 | | |
2664 | | - | |
2665 | | - | |
2666 | | - | |
2667 | | - | |
2668 | | - | |
| 2665 | + | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
2669 | 2684 | | |
2670 | 2685 | | |
2671 | 2686 | | |
| |||
2868 | 2883 | | |
2869 | 2884 | | |
2870 | 2885 | | |
2871 | | - | |
| 2886 | + | |
2872 | 2887 | | |
2873 | 2888 | | |
2874 | 2889 | | |
2875 | 2890 | | |
2876 | 2891 | | |
2877 | 2892 | | |
2878 | | - | |
| 2893 | + | |
| 2894 | + | |
| 2895 | + | |
| 2896 | + | |
| 2897 | + | |
| 2898 | + | |
| 2899 | + | |
| 2900 | + | |
| 2901 | + | |
2879 | 2902 | | |
2880 | 2903 | | |
2881 | 2904 | | |
2882 | 2905 | | |
2883 | 2906 | | |
2884 | 2907 | | |
2885 | 2908 | | |
2886 | | - | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
| 2918 | + | |
| 2919 | + | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
| 2923 | + | |
| 2924 | + | |
2887 | 2925 | | |
2888 | 2926 | | |
2889 | 2927 | | |
2890 | 2928 | | |
2891 | | - | |
| 2929 | + | |
2892 | 2930 | | |
2893 | 2931 | | |
2894 | 2932 | | |
| |||
3344 | 3382 | | |
3345 | 3383 | | |
3346 | 3384 | | |
| 3385 | + | |
| 3386 | + | |
| 3387 | + | |
| 3388 | + | |
| 3389 | + | |
| 3390 | + | |
| 3391 | + | |
| 3392 | + | |
| 3393 | + | |
| 3394 | + | |
| 3395 | + | |
| 3396 | + | |
| 3397 | + | |
| 3398 | + | |
| 3399 | + | |
| 3400 | + | |
| 3401 | + | |
| 3402 | + | |
| 3403 | + | |
| 3404 | + | |
| 3405 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | 44 | | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
401 | 402 | | |
402 | 403 | | |
403 | 404 | | |
| |||
0 commit comments