Commit c9b03c2
committed
Auto merge of #23265 - eddyb:meth-ast-refactor, r=nikomatsakis
The end result is that common fields (id, name, attributes, etc.) are stored in now-structures `ImplItem` and `TraitItem`.
The signature of a method is no longer duplicated between methods with a body (default/impl) and those without, they now share `MethodSig`.
This is also a [breaking-change] because of minor bugfixes and changes to syntax extensions:
* `pub fn` methods in a trait no longer parse - remove the `pub`, it has no meaning anymore
* `MacResult::make_methods` is now `make_impl_items` and the return type has changed accordingly
* `quote_method` is gone, because `P<ast::Method>` doesn't exist and it couldn't represent a full method anyways - could be replaced by `quote_impl_item`/`quote_trait_item` in the future, but I do hope we realize how silly that combinatorial macro expansion is and settle on a single `quote` macro + some type hints - or just no types at all (only token-trees)
r? @nikomatsakis This is necessary (hopefully also sufficient) for associated constants.File tree
59 files changed
+1516
-2575
lines changed- src
- librustc_back
- librustc_borrowck/borrowck
- librustc_lint
- librustc_privacy
- librustc_resolve
- librustc_trans
- save
- trans
- librustc_typeck
- check
- coherence
- librustc
- lint
- metadata
- middle
- infer
- util
- librustdoc
- clean
- html
- libsyntax
- ast_map
- ext
- deriving/generic
- tt
- parse
- print
- test
- auxiliary
- compile-fail
- parse-fail
- run-pass-fulldeps
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
59 files changed
+1516
-2575
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
| 522 | + | |
| 523 | + | |
544 | 524 | | |
545 | 525 | | |
546 | 526 | | |
| |||
611 | 591 | | |
612 | 592 | | |
613 | 593 | | |
614 | | - | |
615 | | - | |
616 | | - | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
617 | 608 | | |
618 | 609 | | |
619 | 610 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | 146 | | |
| 147 | + | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
808 | 808 | | |
809 | 809 | | |
810 | 810 | | |
811 | | - | |
| 811 | + | |
812 | 812 | | |
813 | 813 | | |
814 | 814 | | |
| |||
826 | 826 | | |
827 | 827 | | |
828 | 828 | | |
829 | | - | |
830 | | - | |
831 | | - | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
832 | 832 | | |
833 | 833 | | |
834 | | - | |
| 834 | + | |
835 | 835 | | |
836 | | - | |
| 836 | + | |
837 | 837 | | |
838 | 838 | | |
839 | 839 | | |
840 | 840 | | |
841 | | - | |
| 841 | + | |
842 | 842 | | |
843 | | - | |
844 | 843 | | |
845 | 844 | | |
846 | 845 | | |
| |||
851 | 850 | | |
852 | 851 | | |
853 | 852 | | |
854 | | - | |
| 853 | + | |
855 | 854 | | |
856 | 855 | | |
857 | 856 | | |
| |||
873 | 872 | | |
874 | 873 | | |
875 | 874 | | |
876 | | - | |
877 | | - | |
878 | | - | |
879 | | - | |
880 | | - | |
881 | | - | |
882 | | - | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
883 | 878 | | |
884 | 879 | | |
885 | 880 | | |
| |||
1226 | 1221 | | |
1227 | 1222 | | |
1228 | 1223 | | |
1229 | | - | |
| 1224 | + | |
1230 | 1225 | | |
1231 | 1226 | | |
1232 | 1227 | | |
| |||
1236 | 1231 | | |
1237 | 1232 | | |
1238 | 1233 | | |
1239 | | - | |
1240 | | - | |
1241 | | - | |
1242 | | - | |
1243 | | - | |
| 1234 | + | |
| 1235 | + | |
1244 | 1236 | | |
1245 | 1237 | | |
1246 | 1238 | | |
| |||
1249 | 1241 | | |
1250 | 1242 | | |
1251 | 1243 | | |
1252 | | - | |
1253 | | - | |
1254 | | - | |
1255 | | - | |
1256 | | - | |
1257 | | - | |
1258 | | - | |
1259 | | - | |
1260 | | - | |
1261 | | - | |
1262 | | - | |
1263 | | - | |
1264 | | - | |
1265 | | - | |
1266 | | - | |
1267 | | - | |
1268 | | - | |
1269 | | - | |
1270 | | - | |
| 1244 | + | |
1271 | 1245 | | |
1272 | 1246 | | |
1273 | 1247 | | |
1274 | 1248 | | |
1275 | 1249 | | |
1276 | | - | |
| 1250 | + | |
1277 | 1251 | | |
1278 | 1252 | | |
1279 | 1253 | | |
| |||
1387 | 1361 | | |
1388 | 1362 | | |
1389 | 1363 | | |
1390 | | - | |
1391 | | - | |
1392 | | - | |
1393 | | - | |
1394 | | - | |
1395 | | - | |
1396 | | - | |
1397 | | - | |
1398 | | - | |
1399 | | - | |
1400 | | - | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
1404 | | - | |
1405 | | - | |
1406 | | - | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
1407 | 1376 | | |
1408 | | - | |
1409 | | - | |
1410 | | - | |
1411 | | - | |
1412 | | - | |
1413 | | - | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
1414 | 1384 | | |
1415 | 1385 | | |
1416 | | - | |
1417 | | - | |
1418 | | - | |
| 1386 | + | |
1419 | 1387 | | |
1420 | 1388 | | |
1421 | 1389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
81 | 80 | | |
82 | 81 | | |
83 | 82 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 83 | + | |
| 84 | + | |
89 | 85 | | |
90 | 86 | | |
91 | 87 | | |
| |||
157 | 153 | | |
158 | 154 | | |
159 | 155 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
| 156 | + | |
| 157 | + | |
173 | 158 | | |
174 | 159 | | |
175 | 160 | | |
| |||
412 | 397 | | |
413 | 398 | | |
414 | 399 | | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
433 | 404 | | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
447 | 410 | | |
448 | 411 | | |
449 | 412 | | |
| |||
0 commit comments