@@ -728,10 +728,12 @@ Mangled names conform to the following grammar:
728
728
| <type> "p" // placeholder (e.g. for polymorphic constants), shown as _: T
729
729
| <backref>
730
730
731
- // The encoding of a constant depends on its type, currently only
732
- // unsigned integers (mainly usize, for arrays) are supported, and they
733
- // use their value, in base 16 (0-9a-f), not their memory representation.
734
- <const-data> = {<hex-digit>} "_"
731
+ // The encoding of a constant depends on its type. Integers use their value,
732
+ // in base 16 (0-9a-f), not their memory representation. Negative integer
733
+ // values are preceded with "n". The bool value false is encoded as `0_`, true
734
+ // value as `1_`. The char constants are encoded using their Unicode scalar
735
+ // value.
736
+ <const-data> = ["n"] {<hex-digit>} "_"
735
737
736
738
// <base-62-number> uses 0-9-a-z-A-Z as digits, i.e. 'a' is decimal 10 and
737
739
// 'Z' is decimal 61.
@@ -1152,3 +1154,4 @@ pub static QUUX: u32 = {
1152
1154
- Add a recommended resolution for open question around encoding function parameter types.
1153
1155
- Allow identifiers to start with a digit.
1154
1156
- Make ` <binder> ` optional in ` <fn-sig> ` and ` <dyn-bounds> ` productions.
1157
+ - Extend ` <const-data> ` to include ` bool ` values, ` char ` values, and negative integer values.
0 commit comments