Skip to content

Commit 2c1f94d

Browse files
committed
Mangling: Use <namespace> for namespace production
instead of a mix of `<ns>` and `<namespace>`.
1 parent 98374c4 commit 2c1f94d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -625,12 +625,12 @@ Mangled names conform to the following grammar:
625625
// The <decimal-number> specifies the encoding version.
626626
<symbol-name> = "_R" [<decimal-number>] <path> [<instantiating-crate>]
627627
628-
<path> = "C" <identifier> // crate root
629-
| "M" <impl-path> <type> // <T> (inherent impl)
630-
| "X" <impl-path> <type> <path> // <T as Trait> (trait impl)
631-
| "Y" <type> <path> // <T as Trait> (trait definition)
632-
| "N" <ns> <path> <identifier> // ...::ident (nested path)
633-
| "I" <path> {<generic-arg>} "E" // ...<T, U> (generic args)
628+
<path> = "C" <identifier> // crate root
629+
| "M" <impl-path> <type> // <T> (inherent impl)
630+
| "X" <impl-path> <type> <path> // <T as Trait> (trait impl)
631+
| "Y" <type> <path> // <T as Trait> (trait definition)
632+
| "N" <namespace> <path> <identifier> // ...::ident (nested path)
633+
| "I" <path> {<generic-arg>} "E" // ...<T, U> (generic args)
634634
| <backref>
635635
636636
// Path to an impl (without the Self type or the trait).
@@ -655,10 +655,10 @@ Mangled names conform to the following grammar:
655655
// A-Z are used for special namespaces (e.g. closures), which the demangler
656656
// can show in a special way (e.g. `NC...` as `...::{closure}`), or just
657657
// default to showing the uppercase character.
658-
<ns> = "C" // closure
659-
| "S" // shim
660-
| <A-Z> // other special namespaces
661-
| <a-z> // internal namespaces
658+
<namespace> = "C" // closure
659+
| "S" // shim
660+
| <A-Z> // other special namespaces
661+
| <a-z> // internal namespaces
662662
663663
<generic-arg> = <lifetime>
664664
| <type>
@@ -748,7 +748,7 @@ Mangled names conform to the following grammar:
748748
### Namespace Tags
749749

750750
Namespaces are identified by an implementation defined single character tag
751-
(the `<ns>` production). Only closures (`C`) and shims (`S`) have a
751+
(the `<namespace>` production). Only closures (`C`) and shims (`S`) have a
752752
specific character assigned to them so that demanglers can reliable
753753
adjust their output accordingly. Other namespace tags have to be omitted
754754
or shown verbatim during demangling.

0 commit comments

Comments
 (0)