about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-05-06 15:17:13 +0000
committerbors <bors@rust-lang.org>2018-05-06 15:17:13 +0000
commitfb9e0588901dc2311f5e8f63f1c041e83041a596 (patch)
treeb9a3c4902618105f94df39d71087d2681ca9343d /src/libsyntax
parent2416032bb79ede22388b3be10a7a8b94dccd5109 (diff)
parent39df2231bb7d3de171b6a7117bb76bbee5a4597f (diff)
downloadrust-fb9e0588901dc2311f5e8f63f1c041e83041a596.tar.gz
rust-fb9e0588901dc2311f5e8f63f1c041e83041a596.zip
Auto merge of #50474 - sinkuu:fix_assert_ice, r=alexcrichton
Fix ICE in assertion macro

Fixes #50471. Needs beta-backport (stable-to-beta/nightly regression).

* `panic` with single argument does not need escaping `{` and `}`
* Instead of unescaping `\u{...}` manually, just use `escape_debug` in pprust
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/print/pprust.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index d8228e2b28b..b8ddb063d98 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -656,7 +656,7 @@ pub trait PrintState<'a> {
                     style: ast::StrStyle) -> io::Result<()> {
         let st = match style {
             ast::StrStyle::Cooked => {
-                (format!("\"{}\"", st.escape_default()))
+                (format!("\"{}\"", st.escape_debug()))
             }
             ast::StrStyle::Raw(n) => {
                 (format!("r{delim}\"{string}\"{delim}",