Commit 4d1c273
authored
Rollup merge of #99249 - cjgillot:no-reparse-fn, r=fee1-dead
Do not re-parse function signatures to suggest generics
This PR uses the existing resolution rib infrastructure to channel the correct span information to suggest generic parameters. This allows to avoid re-parsing a function's source code.
Drive-by cleanup: this removes useless `FnItemRibKind` from late resolution ribs. All the use cases are already covered by `ItemRibKind` and `AssocItemRibKind` which have more precise semantics.File tree
18 files changed
+134
-218
lines changed- compiler
- rustc_resolve/src
- rustc_span/src
- rustc_typeck/src/check
- src/test/ui
- const-generics/early
- error-codes
- generics
- issues
- resolve
- type
18 files changed
+134
-218
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
514 | | - | |
| 514 | + | |
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
| |||
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
| 539 | + | |
539 | 540 | | |
540 | 541 | | |
541 | 542 | | |
542 | 543 | | |
543 | 544 | | |
| 545 | + | |
544 | 546 | | |
545 | 547 | | |
546 | 548 | | |
547 | 549 | | |
548 | 550 | | |
549 | 551 | | |
550 | 552 | | |
551 | | - | |
| 553 | + | |
552 | 554 | | |
553 | | - | |
| 555 | + | |
554 | 556 | | |
555 | 557 | | |
556 | 558 | | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
570 | 563 | | |
571 | | - | |
572 | | - | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
573 | 570 | | |
574 | 571 | | |
575 | 572 | | |
| |||
| 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 | | |
| |||
1103 | 1105 | | |
1104 | 1106 | | |
1105 | 1107 | | |
1106 | | - | |
| 1108 | + | |
1107 | 1109 | | |
1108 | 1110 | | |
1109 | 1111 | | |
| |||
1168 | 1170 | | |
1169 | 1171 | | |
1170 | 1172 | | |
1171 | | - | |
1172 | 1173 | | |
1173 | 1174 | | |
1174 | 1175 | | |
| 1176 | + | |
1175 | 1177 | | |
1176 | 1178 | | |
1177 | 1179 | | |
| |||
1180 | 1182 | | |
1181 | 1183 | | |
1182 | 1184 | | |
1183 | | - | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
1184 | 1188 | | |
1185 | 1189 | | |
1186 | 1190 | | |
| |||
1207 | 1211 | | |
1208 | 1212 | | |
1209 | 1213 | | |
1210 | | - | |
1211 | 1214 | | |
1212 | 1215 | | |
1213 | 1216 | | |
| |||
1232 | 1235 | | |
1233 | 1236 | | |
1234 | 1237 | | |
1235 | | - | |
1236 | | - | |
1237 | | - | |
1238 | | - | |
1239 | | - | |
1240 | | - | |
1241 | | - | |
1242 | | - | |
1243 | 1238 | | |
1244 | 1239 | | |
1245 | 1240 | | |
1246 | 1241 | | |
1247 | | - | |
1248 | 1242 | | |
1249 | 1243 | | |
1250 | 1244 | | |
| 1245 | + | |
1251 | 1246 | | |
1252 | 1247 | | |
1253 | 1248 | | |
1254 | 1249 | | |
1255 | 1250 | | |
1256 | | - | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
1257 | 1254 | | |
1258 | 1255 | | |
1259 | 1256 | | |
| |||
1272 | 1269 | | |
1273 | 1270 | | |
1274 | 1271 | | |
1275 | | - | |
1276 | 1272 | | |
1277 | 1273 | | |
1278 | 1274 | | |
| |||
0 commit comments