about summary refs log tree commit diff
path: root/src/libsyntax/print/pprust.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2019-02-01 13:31:24 +0100
committerSimon Sapin <simon.sapin@exyr.org>2019-02-12 09:55:20 +0100
commit7a077804a3a58c93f690e382c86ccd4f1a8850af (patch)
tree01e31a8271689a67d4935060d833d0a75b69a8bf /src/libsyntax/print/pprust.rs
parent92dcae47425a9084b97680bc0327ac88353b8a68 (diff)
downloadrust-7a077804a3a58c93f690e382c86ccd4f1a8850af.tar.gz
rust-7a077804a3a58c93f690e382c86ccd4f1a8850af.zip
New return types for str::escape_* that impl Display and Iterator<char>
As FCP’ed in the tracking issue: https://github.com/rust-lang/rust/issues/27791#issuecomment-376864727
Diffstat (limited to 'src/libsyntax/print/pprust.rs')
-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 c670f47b597..cdf805176a2 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -606,7 +606,7 @@ pub trait PrintState<'a> {
         match lit.node {
             ast::LitKind::Str(st, style) => self.print_string(&st.as_str(), style),
             ast::LitKind::Err(st) => {
-                let st = st.as_str().escape_debug();
+                let st = st.as_str().escape_debug().to_string();
                 let mut res = String::with_capacity(st.len() + 2);
                 res.push('\'');
                 res.push_str(&st);