Commit cae1647
committed
Auto merge of rust-lang#55937 - davidtwco:issue-54943, r=pnkfelix
NLL: User type annotations refactor, associated constant patterns and ref bindings.
Fixes rust-lang#55511 and Fixes rust-lang#55401. Contributes to rust-lang#54943.
This PR performs a large refactoring on user type annotations, checks user type annotations for associated constants in patterns and that user type annotations for `ref` bindings are respected.
r? @nikomatsakisFile tree
47 files changed
+804
-500
lines changed- src
- librustc_mir
- borrow_check/nll
- type_check
- build
- expr
- matches
- hair
- cx
- pattern
- transform
- util
- librustc_traits
- librustc_typeck/check
- method
- librustc
- ich
- mir
- traits/query/type_op
- ty
- query
- test
- incremental/hashes
- mir-opt
- run-pass/associated-consts
- ui
- nll
- user-annotations
- regions
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
47 files changed
+804
-500
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | 497 | | |
515 | 498 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1251 | 1251 | | |
1252 | 1252 | | |
1253 | 1253 | | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
32 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| |||
121 | 124 | | |
122 | 125 | | |
123 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
124 | 130 | | |
125 | 131 | | |
126 | 132 | | |
| |||
161 | 167 | | |
162 | 168 | | |
163 | 169 | | |
164 | | - | |
| 170 | + | |
| 171 | + | |
165 | 172 | | |
166 | 173 | | |
167 | 174 | | |
| |||
185 | 192 | | |
186 | 193 | | |
187 | 194 | | |
| 195 | + | |
188 | 196 | | |
189 | 197 | | |
190 | 198 | | |
| |||
418 | 426 | | |
419 | 427 | | |
420 | 428 | | |
| 429 | + | |
421 | 430 | | |
422 | 431 | | |
423 | 432 | | |
| |||
2232 | 2241 | | |
2233 | 2242 | | |
2234 | 2243 | | |
2235 | | - | |
| 2244 | + | |
2236 | 2245 | | |
2237 | 2246 | | |
2238 | 2247 | | |
| |||
2446 | 2455 | | |
2447 | 2456 | | |
2448 | 2457 | | |
2449 | | - | |
| 2458 | + | |
2450 | 2459 | | |
2451 | 2460 | | |
2452 | 2461 | | |
2453 | 2462 | | |
2454 | | - | |
2455 | | - | |
2456 | | - | |
2457 | | - | |
2458 | | - | |
2459 | | - | |
2460 | | - | |
2461 | | - | |
2462 | | - | |
2463 | | - | |
2464 | | - | |
2465 | | - | |
2466 | | - | |
2467 | | - | |
2468 | | - | |
2469 | | - | |
2470 | | - | |
2471 | | - | |
2472 | | - | |
2473 | | - | |
2474 | | - | |
2475 | | - | |
2476 | | - | |
2477 | | - | |
2478 | | - | |
2479 | | - | |
2480 | | - | |
2481 | 2463 | | |
2482 | 2464 | | |
2483 | 2465 | | |
| |||
2537 | 2519 | | |
2538 | 2520 | | |
2539 | 2521 | | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + | |
| 2538 | + | |
| 2539 | + | |
| 2540 | + | |
| 2541 | + | |
| 2542 | + | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
| 2546 | + | |
| 2547 | + | |
| 2548 | + | |
| 2549 | + | |
| 2550 | + | |
| 2551 | + | |
| 2552 | + | |
| 2553 | + | |
| 2554 | + | |
| 2555 | + | |
| 2556 | + | |
| 2557 | + | |
| 2558 | + | |
| 2559 | + | |
| 2560 | + | |
| 2561 | + | |
| 2562 | + | |
| 2563 | + | |
2540 | 2564 | | |
2541 | 2565 | | |
2542 | 2566 | | |
| |||
2556 | 2580 | | |
2557 | 2581 | | |
2558 | 2582 | | |
2559 | | - | |
| 2583 | + | |
2560 | 2584 | | |
2561 | 2585 | | |
2562 | 2586 | | |
2563 | 2587 | | |
2564 | 2588 | | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
| 2609 | + | |
| 2610 | + | |
| 2611 | + | |
| 2612 | + | |
| 2613 | + | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
| 2618 | + | |
| 2619 | + | |
| 2620 | + | |
| 2621 | + | |
2565 | 2622 | | |
2566 | 2623 | | |
2567 | 2624 | | |
| |||
2970 | 3027 | | |
2971 | 3028 | | |
2972 | 3029 | | |
| 3030 | + | |
2973 | 3031 | | |
2974 | 3032 | | |
2975 | 3033 | | |
| |||
2983 | 3041 | | |
2984 | 3042 | | |
2985 | 3043 | | |
| 3044 | + | |
2986 | 3045 | | |
2987 | 3046 | | |
2988 | 3047 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
219 | 220 | | |
220 | 221 | | |
221 | 222 | | |
222 | | - | |
| 223 | + | |
| 224 | + | |
223 | 225 | | |
224 | | - | |
| 226 | + | |
225 | 227 | | |
226 | 228 | | |
227 | 229 | | |
| |||
307 | 309 | | |
308 | 310 | | |
309 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
310 | 320 | | |
311 | 321 | | |
312 | 322 | | |
| |||
865 | 875 | | |
866 | 876 | | |
867 | 877 | | |
868 | | - | |
| 878 | + | |
869 | 879 | | |
870 | | - | |
871 | | - | |
872 | | - | |
873 | | - | |
874 | | - | |
875 | 880 | | |
876 | 881 | | |
877 | 882 | | |
878 | 883 | | |
879 | | - | |
| 884 | + | |
| 885 | + | |
880 | 886 | | |
881 | 887 | | |
882 | 888 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
0 commit comments