about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-02-04 15:49:43 +0000
committerbors <bors@rust-lang.org>2015-02-04 15:49:43 +0000
commit3ae76d5c1cca83eff3a4716550da357ca2abcd21 (patch)
tree79f85881c190ecbc03282d6491176cf731cbadd6 /src/libstd/sys
parentac134f7ca435551964996ee88319241cd3c7c110 (diff)
parentcfe18fb83627859e1730d31ae9126c494077c3ba (diff)
downloadrust-3ae76d5c1cca83eff3a4716550da357ca2abcd21.tar.gz
rust-3ae76d5c1cca83eff3a4716550da357ca2abcd21.zip
Auto merge of #21544 - P1start:mangle-unicode, r=alexcrichton
`{` and `}` aren’t valid characters on ARM, so this makes Unicode characters render as, e.g., `$u38d$` instead of `$u{38d}`.

This also fixes a small bug where `)` (**r**ight **p**arenthesis) and `*` (**r**aw **p**ointer) would both mangle to `$RP$`, making `)` show up as `*` in backtraces.
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/common/backtrace.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/sys/common/backtrace.rs b/src/libstd/sys/common/backtrace.rs
index a71676c6bf2..50a9f204799 100644
--- a/src/libstd/sys/common/backtrace.rs
+++ b/src/libstd/sys/common/backtrace.rs
@@ -107,9 +107,8 @@ pub fn demangle(writer: &mut Writer, s: &str) -> IoResult<()> {
                     // see src/librustc/back/link.rs for these mappings
                     demangle! (
                         "$SP$", => "@",
-                        "$UP$", => "Box",
-                        "$RP$", => "*",
-                        "$BP$", => "&",
+                        "$BP$", => "*",
+                        "$RF$", => "&",
                         "$LT$", => "<",
                         "$GT$", => ">",
                         "$LP$", => "(",
@@ -118,10 +117,11 @@ pub fn demangle(writer: &mut Writer, s: &str) -> IoResult<()> {
 
                         // in theory we can demangle any Unicode code point, but
                         // for simplicity we just catch the common ones.
-                        "$u{20}", => " ",
-                        "$u{27}", => "'",
-                        "$u{5b}", => "[",
-                        "$u{5d}", => "]"
+                        "$u7e$", => "~",
+                        "$u20$", => " ",
+                        "$u27$", => "'",
+                        "$u5b$", => "[",
+                        "$u5d$", => "]"
                     )
                 } else {
                     let idx = match rest.find('$') {