This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 2a8a0fc
committed
Auto merge of rust-lang#96883 - jackh726:early-binder-2, r=oli-obk
Add EarlyBinder
Chalk has no concept of `Param` (https://github.com/rust-lang/chalk/blob/e0ade19d139bc784384acc6736cd960c91dd55a1/chalk-ir/src/lib.rs#L579) or `ReEarlyBound` (https://github.com/rust-lang/chalk/blob/e0ade19d139bc784384acc6736cd960c91dd55a1/chalk-ir/src/lib.rs#L1308). Everything is just "bound" - the equivalent of rustc's late-bound. It's not completely clear yet whether to move everything to the same time of binder in rustc or add `Param` and `ReEarlyBound` in Chalk.
Either way, tracking when we have or haven't already substituted out these in rustc can be helpful.
As a first step, I'm just adding a `EarlyBinder` newtype that is required to call `subst`. I also add a couple "transparent" `bound_*` wrappers around a couple query that are often immediately substituted.
r? `@nikomatsakis`File tree
67 files changed
+400
-217
lines changed- compiler
- rustc_borrowck/src
- diagnostics
- rustc_const_eval/src
- const_eval
- interpret/intrinsics
- rustc_infer/src/infer
- error_reporting
- outlives
- rustc_middle/src
- mir
- ty
- print
- rustc_mir_build/src/build
- matches
- rustc_mir_transform/src
- rustc_symbol_mangling/src
- rustc_trait_selection/src/traits
- error_reporting
- query
- select
- specialize
- rustc_traits/src
- chalk
- rustc_ty_utils/src
- rustc_typeck/src
- astconv
- check
- fn_ctxt
- method
- outlives
- src
- librustdoc/clean
- tools/clippy
- clippy_lints/src
- transmute
- clippy_utils/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
67 files changed
+400
-217
lines changedLines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
336 | 338 | | |
337 | 339 | | |
338 | 340 | | |
339 | | - | |
| 341 | + | |
340 | 342 | | |
341 | 343 | | |
342 | 344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
480 | | - | |
481 | | - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
482 | 485 | | |
483 | 486 | | |
484 | 487 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
961 | 961 | | |
962 | 962 | | |
963 | 963 | | |
964 | | - | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
965 | 967 | | |
966 | 968 | | |
967 | 969 | | |
968 | 970 | | |
969 | | - | |
| 971 | + | |
970 | 972 | | |
971 | 973 | | |
972 | 974 | | |
| |||
1383 | 1385 | | |
1384 | 1386 | | |
1385 | 1387 | | |
1386 | | - | |
1387 | | - | |
| 1388 | + | |
| 1389 | + | |
1388 | 1390 | | |
1389 | 1391 | | |
1390 | 1392 | | |
| |||
1395 | 1397 | | |
1396 | 1398 | | |
1397 | 1399 | | |
1398 | | - | |
| 1400 | + | |
1399 | 1401 | | |
1400 | 1402 | | |
1401 | 1403 | | |
| |||
1405 | 1407 | | |
1406 | 1408 | | |
1407 | 1409 | | |
1408 | | - | |
| 1410 | + | |
1409 | 1411 | | |
1410 | 1412 | | |
1411 | 1413 | | |
| |||
1847 | 1849 | | |
1848 | 1850 | | |
1849 | 1851 | | |
1850 | | - | |
| 1852 | + | |
1851 | 1853 | | |
1852 | | - | |
| 1854 | + | |
1853 | 1855 | | |
1854 | 1856 | | |
1855 | 1857 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
564 | | - | |
| 564 | + | |
565 | 565 | | |
566 | | - | |
| 566 | + | |
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
| 293 | + | |
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2393 | 2393 | | |
2394 | 2394 | | |
2395 | 2395 | | |
2396 | | - | |
| 2396 | + | |
2397 | 2397 | | |
2398 | 2398 | | |
2399 | 2399 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
206 | 208 | | |
207 | 209 | | |
208 | 210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1603 | 1603 | | |
1604 | 1604 | | |
1605 | 1605 | | |
1606 | | - | |
| 1606 | + | |
1607 | 1607 | | |
1608 | 1608 | | |
1609 | 1609 | | |
| |||
2332 | 2332 | | |
2333 | 2333 | | |
2334 | 2334 | | |
2335 | | - | |
| 2335 | + | |
2336 | 2336 | | |
2337 | 2337 | | |
2338 | 2338 | | |
| |||
0 commit comments