diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-06 15:49:15 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-06 15:49:15 -0800 |
| commit | 26cd8eae48ea99bda183c5224bc423991ccfaf1f (patch) | |
| tree | 26492380aa79b1b1f70acb2a624e30ca097374df /src/libstd/sys/common | |
| parent | 34a63d336419e80d3afec16c730d1ad5fa11dc73 (diff) | |
| parent | e9cbdd866d1c9c01e9affaf6875e37e58a073758 (diff) | |
| download | rust-26cd8eae48ea99bda183c5224bc423991ccfaf1f.tar.gz rust-26cd8eae48ea99bda183c5224bc423991ccfaf1f.zip | |
rollup merge of #20563: cmr/macro-input-future-proofing
Diffstat (limited to 'src/libstd/sys/common')
| -rw-r--r-- | src/libstd/sys/common/backtrace.rs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/libstd/sys/common/backtrace.rs b/src/libstd/sys/common/backtrace.rs index d4039fd96ff..be44aa99f49 100644 --- a/src/libstd/sys/common/backtrace.rs +++ b/src/libstd/sys/common/backtrace.rs @@ -88,7 +88,7 @@ pub fn demangle(writer: &mut Writer, s: &str) -> IoResult<()> { while rest.len() > 0 { if rest.starts_with("$") { macro_rules! demangle { - ($($pat:expr => $demangled:expr),*) => ({ + ($($pat:expr, => $demangled:expr),*) => ({ $(if rest.starts_with($pat) { try!(writer.write_str($demangled)); rest = rest.slice_from($pat.len()); @@ -103,22 +103,22 @@ pub fn demangle(writer: &mut Writer, s: &str) -> IoResult<()> { // see src/librustc/back/link.rs for these mappings demangle! ( - "$SP$" => "@", - "$UP$" => "Box", - "$RP$" => "*", - "$BP$" => "&", - "$LT$" => "<", - "$GT$" => ">", - "$LP$" => "(", - "$RP$" => ")", - "$C$" => ",", + "$SP$", => "@", + "$UP$", => "Box", + "$RP$", => "*", + "$BP$", => "&", + "$LT$", => "<", + "$GT$", => ">", + "$LP$", => "(", + "$RP$", => ")", + "$C$", => ",", // 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}" => "]" + "$u{20}", => " ", + "$u{27}", => "'", + "$u{5b}", => "[", + "$u{5d}", => "]" ) } else { let idx = match rest.find('$') { |
