Commit a4c0bf5
committed
switch to v0 mangling by default on stable
Following #89117, rustc has defaulted to the v0 mangling
scheme by default (since Nov 20th 2025). This surfaced two bugs:
- #138261 was a small ICE (found via fuzzing) where an
implementation-internal namespace was missing for global assembly -
this occurs with names instantiated within global assembly (that can
happen inside constants)
- #134479 only occurs with unstable `generic_const_exprs`
Since there have been three-to-four months for users to find bugs with
this mangling scheme on nightly, that the scheme has been waiting many
years to be stabilised, and has been used successfully internally at
Microsoft, Meta and Google for many years, this patch proposes
stabilising the v0 mangling scheme on stable.
This patch does not propose removing the legacy mangling, it will remain
usable on nightly as an escape-hatch if there are remaining bugs (though
admittedly it would require switching to nightly for those on stable) -
it is anticipated that this would be unlikely given current testing
undergone by v0. Legacy mangling can be removed in another follow-up.1 parent f60a0f1 commit a4c0bf5
4 files changed
Lines changed: 7 additions & 21 deletions
File tree
- compiler/rustc_session/src
- src
- bootstrap/src/core/builder
- doc/rustc/src/symbol-mangling
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1483 | 1483 | | |
1484 | 1484 | | |
1485 | 1485 | | |
1486 | | - | |
1487 | | - | |
1488 | | - | |
1489 | | - | |
1490 | | - | |
| 1486 | + | |
1491 | 1487 | | |
1492 | 1488 | | |
1493 | 1489 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2194 | 2194 | | |
2195 | 2195 | | |
2196 | 2196 | | |
2197 | | - | |
| 2197 | + | |
2198 | 2198 | | |
2199 | 2199 | | |
2200 | 2200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | 667 | | |
678 | 668 | | |
679 | 669 | | |
| |||
683 | 673 | | |
684 | 674 | | |
685 | 675 | | |
686 | | - | |
| 676 | + | |
| 677 | + | |
687 | 678 | | |
688 | 679 | | |
689 | 680 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
0 commit comments