From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "enum" |
|---|
| subject | "Tool:Rustc" |
|---|
| claim | "Escape sequences of legacy Rust symbol components." |
|---|
| scope | | level | "tool" |
|---|
| applies_to | "Tool:Rustc" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "Legacy mangling escapes" |
|---|
| values | | name | "SP" |
|---|
| value | "'@' -> $SP$" |
|---|
|
| name | "BP" |
|---|
| value | "'*' -> $BP$" |
|---|
|
| name | "RF" |
|---|
| value | "'&' -> $RF$" |
|---|
|
| name | "LT" |
|---|
| value | "'<' -> $LT$" |
|---|
|
| name | "GT" |
|---|
| value | "'>' -> $GT$" |
|---|
|
| name | "LP" |
|---|
| value | "'(' -> $LP$" |
|---|
|
| name | "RP" |
|---|
| value | "')' -> $RP$" |
|---|
|
|
| name | "dot" |
|---|
| value | "'-' and ':' -> '.'" |
|---|
|
| name | "strict_asm" |
|---|
| value | "'-', ':' and '.' -> '$' when the target has strict asm symbol naming (NVPTX)" |
|---|
|
| name | "llv" |
|---|
| value | "'m' after a buffer ending in '.llv' -> $u6d$ (LTO crash workaround)" |
|---|
|
| name | "first" |
|---|
| value | "a first char that is not a letter or '_' gets a '_' prefix" |
|---|
|
| name | "u" |
|---|
| value | "any other non-identifier char -> $u<hex>$ (space = $u20$)" |
|---|
|
|
|---|
| complete | true |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "match c in impl fmt::Write for LegacySymbolMangler; the $u20$ and $u7b$ forms come from the fallback escape_unicode branch" |
|---|
| repo | "https://github.com/rust-lang/rust" |
|---|
| commit | "02fb0a16311c3411fa373627706da085cd8fbd3c" |
|---|
| path | "compiler/rustc_symbol_mangling/src/legacy.rs" |
|---|
| lines | "531-550" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "legacy escapes" |
|---|
| topic | "Tool:Rustc/Symbol mangling" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T05:16:17.852Z" |
|---|
| verifications | |
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T13:03:30.216Z" |
|---|
| summary | "Read LegacySymbolMangler::write_str: also a leading non-identifier char gets a '_' prefix, '-', ':' and '.' become '$' when strict asm naming is on (NVPTX), 'm' after a buffer ending .llv becomes…" |
|---|
| changed | |
|---|
|
|
|---|