Skip to content

Commit d376e63

Browse files
committed
Add description of forwards-compatible behavior.
1 parent ceda03d commit d376e63

File tree

1 file changed

+8
-0
lines changed
  • src/doc/rustc/src/symbol-mangling

1 file changed

+8
-0
lines changed

src/doc/rustc/src/symbol-mangling/v0.md

+8
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ There is no standardized demangled form of the symbols,
2525
though suggestions are provided for how to demangle a symbol.
2626
Implementers may choose to demangle in different ways.
2727

28+
## Extensions
29+
30+
This format may be extended in the future to add new tags as Rust is extended with new language items.
31+
To be forward compatible, demanglers should gracefully handle symbols that have encodings where it encounters a tag character not described in this document.
32+
For example, they may fall back to displaying the mangled symbol.
33+
The format may be extended anywhere there is a tag character, such as the [type] rule.
34+
The meaning of existing tags and encodings will not be changed.
35+
2836
## Grammar notation
2937

3038
The format of an encoded symbol is illustrated as a context free grammar in an extended BNF-like syntax.

0 commit comments

Comments
 (0)