Skip to content

Commit 230ad2a

Browse files
committed
Mangling: Make <binder> optional in <fn-sig> and <dyn-bounds>
1 parent 3b701d1 commit 230ad2a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

text/2603-rust-symbol-name-mangling-v0.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,7 @@ Mangled names conform to the following grammar:
675675
// innermost lifetimes, e.g. in `for<'a, 'b> fn(for<'c> fn(...))`,
676676
// any <lifetime>s in ... (but not inside more binders) will observe
677677
// the indices 1, 2, and 3 refer to 'c, 'b, and 'a, respectively.
678+
// The number of bound lifetimes is value of <base-62-number> + 1.
678679
<binder> = "G" <base-62-number>
679680
680681
<type> = <basic-type>
@@ -715,12 +716,12 @@ Mangled names conform to the following grammar:
715716
// If the "U" is present then the function is `unsafe`.
716717
// The return type is always present, but demanglers can
717718
// choose to omit the ` -> ()` by special-casing "u".
718-
<fn-sig> = <binder> ["U"] ["K" <abi>] {<type>} "E" <type>
719+
<fn-sig> = [<binder>] ["U"] ["K" <abi>] {<type>} "E" <type>
719720
720721
<abi> = "C"
721722
| <undisambiguated-identifier>
722723
723-
<dyn-bounds> = <binder> {<dyn-trait>} "E"
724+
<dyn-bounds> = [<binder>] {<dyn-trait>} "E"
724725
<dyn-trait> = <path> {<dyn-trait-assoc-binding>}
725726
<dyn-trait-assoc-binding> = "p" <undisambiguated-identifier> <type>
726727
<const> = <type> <const-data>
@@ -1150,3 +1151,4 @@ pub static QUUX: u32 = {
11501151
- Add a recommended resolution for open question around Punycode identifiers.
11511152
- Add a recommended resolution for open question around encoding function parameter types.
11521153
- Allow identifiers to start with a digit.
1154+
- Make `<binder>` optional in `<fn-sig>` and `<dyn-bounds>` productions.

0 commit comments

Comments
 (0)