Skip to content

Commit

Permalink
Add description of forwards-compatible behavior.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jun 5, 2023
1 parent ceda03d commit d376e63
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/doc/rustc/src/symbol-mangling/v0.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ There is no standardized demangled form of the symbols,
though suggestions are provided for how to demangle a symbol.
Implementers may choose to demangle in different ways.

## Extensions

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

## Grammar notation

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

0 comments on commit d376e63

Please sign in to comment.