Commit 7fea022
committed
Auto merge of #57967 - eddyb:rmangle, r=<try>
Introduce Rust symbol mangling scheme.
This is an implementation of a "feature-complete" Rust mangling scheme, in the vein of rust-lang/rfcs#2603 - but with some differences, see rust-lang/rfcs#2603 (comment) for details.
The demangling implementation PR is rust-lang/rustc-demangle#23
(this PR already uses it via a git dependency, to allow testing).
Discussion of the *design* of the mangling scheme should still happen on the RFC, but this PR's specific implementation details can be reviewed in parallel.
<hr/>
*Notes for reviewers*:
* only the last 6 commits are specific to this branch, if necessary I can open a separate PR for everything else (it was meant to be its own small refactoring, but it got a bit out of hand)
* the "TEMPORARY" commit is only there because it does some extra validation (comparing the demangling from `rustc-demangle` to the compiler's pretty-printing, adjusted slightly to produce the same output), that I would like to try on crater
* there is the question of whether we should turn on the new mangling now, wait for tools to support it (I'm working on that), and/or have it under a `-Z` flag for now
r? @nikomatsakis / @michaelwoerister cc @rust-lang/compilerFile tree
147 files changed
+5017
-2834
lines changed- src
- librustc_borrowck/borrowck
- librustc_codegen_llvm
- librustc_codegen_ssa
- mir
- traits
- librustc_codegen_utils
- symbol_names
- librustc_driver
- librustc_incremental
- persist
- librustc_lint
- librustc_mir
- borrow_check
- nll
- explain_borrow
- region_infer/error_reporting
- hair
- cx
- pattern
- interpret
- monomorphize
- transform
- util
- librustc_privacy
- librustc_save_analysis
- librustc_typeck
- check
- method
- coherence
- variance
- librustc
- dep_graph
- hir
- map
- infer
- error_reporting
- nice_region_error
- outlives
- middle
- mir
- traits
- specialize
- ty
- print
- query
- util
- librustdoc
- clean
- libstd
- libsyntax
- test
- codegen
- mir-opt
- run-make-fulldeps
- a-b-a-linker-guard
- stable-symbol-names
- symbol-visibility
- run-pass
- ui
- bad
- consts
- deprecation
- impl-trait
- issues
- issue-37311-type-length-limit
- namespace
- nll/closure-requirements
- privacy
- regions
- symbol-names
- tools/tidy/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
147 files changed
+5017
-2834
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1877 | 1877 | | |
1878 | 1878 | | |
1879 | 1879 | | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
1880 | 1885 | | |
1881 | 1886 | | |
1882 | 1887 | | |
| |||
2362 | 2367 | | |
2363 | 2368 | | |
2364 | 2369 | | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
2365 | 2375 | | |
2366 | 2376 | | |
2367 | 2377 | | |
| |||
2488 | 2498 | | |
2489 | 2499 | | |
2490 | 2500 | | |
2491 | | - | |
| 2501 | + | |
2492 | 2502 | | |
2493 | 2503 | | |
2494 | 2504 | | |
| |||
2504 | 2514 | | |
2505 | 2515 | | |
2506 | 2516 | | |
2507 | | - | |
| 2517 | + | |
2508 | 2518 | | |
2509 | 2519 | | |
2510 | 2520 | | |
| |||
2525 | 2535 | | |
2526 | 2536 | | |
2527 | 2537 | | |
| 2538 | + | |
2528 | 2539 | | |
| 2540 | + | |
2529 | 2541 | | |
2530 | 2542 | | |
2531 | 2543 | | |
2532 | 2544 | | |
2533 | 2545 | | |
| 2546 | + | |
2534 | 2547 | | |
2535 | 2548 | | |
2536 | 2549 | | |
| |||
3082 | 3095 | | |
3083 | 3096 | | |
3084 | 3097 | | |
3085 | | - | |
| 3098 | + | |
3086 | 3099 | | |
3087 | 3100 | | |
3088 | 3101 | | |
3089 | 3102 | | |
3090 | 3103 | | |
3091 | 3104 | | |
3092 | 3105 | | |
| 3106 | + | |
| 3107 | + | |
| 3108 | + | |
| 3109 | + | |
| 3110 | + | |
| 3111 | + | |
| 3112 | + | |
| 3113 | + | |
3093 | 3114 | | |
3094 | 3115 | | |
3095 | 3116 | | |
| |||
3549 | 3570 | | |
3550 | 3571 | | |
3551 | 3572 | | |
| 3573 | + | |
| 3574 | + | |
| 3575 | + | |
| 3576 | + | |
| 3577 | + | |
3552 | 3578 | | |
3553 | 3579 | | |
3554 | 3580 | | |
| |||
3940 | 3966 | | |
3941 | 3967 | | |
3942 | 3968 | | |
| 3969 | + | |
3943 | 3970 | | |
3944 | 3971 | | |
3945 | 3972 | | |
| |||
3981 | 4008 | | |
3982 | 4009 | | |
3983 | 4010 | | |
| 4011 | + | |
3984 | 4012 | | |
3985 | 4013 | | |
3986 | 4014 | | |
| |||
4008 | 4036 | | |
4009 | 4037 | | |
4010 | 4038 | | |
| 4039 | + | |
4011 | 4040 | | |
4012 | 4041 | | |
4013 | 4042 | | |
| |||
4045 | 4074 | | |
4046 | 4075 | | |
4047 | 4076 | | |
| 4077 | + | |
4048 | 4078 | | |
4049 | 4079 | | |
4050 | 4080 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
721 | 721 | | |
722 | 722 | | |
723 | 723 | | |
724 | | - | |
| 724 | + | |
725 | 725 | | |
726 | 726 | | |
727 | 727 | | |
| |||
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
736 | | - | |
| 736 | + | |
737 | 737 | | |
738 | 738 | | |
739 | 739 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
| 252 | + | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
663 | | - | |
| 663 | + | |
664 | 664 | | |
665 | | - | |
| 665 | + | |
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
669 | | - | |
| 669 | + | |
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1189 | 1189 | | |
1190 | 1190 | | |
1191 | 1191 | | |
1192 | | - | |
| 1192 | + | |
| 1193 | + | |
1193 | 1194 | | |
1194 | 1195 | | |
1195 | 1196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
448 | 533 | | |
449 | 534 | | |
450 | 535 | | |
451 | 536 | | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
456 | 542 | | |
457 | 543 | | |
458 | | - | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
459 | 551 | | |
460 | 552 | | |
461 | 553 | | |
| |||
650 | 742 | | |
651 | 743 | | |
652 | 744 | | |
653 | | - | |
| 745 | + | |
654 | 746 | | |
655 | 747 | | |
656 | 748 | | |
| |||
675 | 767 | | |
676 | 768 | | |
677 | 769 | | |
678 | | - | |
| 770 | + | |
679 | 771 | | |
680 | 772 | | |
681 | 773 | | |
| |||
740 | 832 | | |
741 | 833 | | |
742 | 834 | | |
743 | | - | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
744 | 841 | | |
745 | | - | |
| 842 | + | |
746 | 843 | | |
747 | | - | |
748 | 844 | | |
749 | 845 | | |
750 | 846 | | |
| |||
755 | 851 | | |
756 | 852 | | |
757 | 853 | | |
758 | | - | |
759 | | - | |
| 854 | + | |
| 855 | + | |
760 | 856 | | |
761 | 857 | | |
762 | 858 | | |
| |||
1011 | 1107 | | |
1012 | 1108 | | |
1013 | 1109 | | |
1014 | | - | |
| 1110 | + | |
1015 | 1111 | | |
1016 | 1112 | | |
1017 | 1113 | | |
| |||
1423 | 1519 | | |
1424 | 1520 | | |
1425 | 1521 | | |
1426 | | - | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
1427 | 1526 | | |
1428 | 1527 | | |
1429 | 1528 | | |
| |||
0 commit comments