From 7a077804a3a58c93f690e382c86ccd4f1a8850af Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Fri, 1 Feb 2019 13:31:24 +0100 Subject: New return types for str::escape_* that impl Display and Iterator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As FCP’ed in the tracking issue: https://github.com/rust-lang/rust/issues/27791#issuecomment-376864727 --- src/libsyntax/attr/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax/attr') diff --git a/src/libsyntax/attr/mod.rs b/src/libsyntax/attr/mod.rs index 0c3aedae715..6c3f6c173ed 100644 --- a/src/libsyntax/attr/mod.rs +++ b/src/libsyntax/attr/mod.rs @@ -634,7 +634,7 @@ impl LitKind { match *self { LitKind::Str(string, ast::StrStyle::Cooked) => { - let escaped = string.as_str().escape_default(); + let escaped = string.as_str().escape_default().to_string(); Token::Literal(token::Lit::Str_(Symbol::intern(&escaped)), None) } LitKind::Str(string, ast::StrStyle::Raw(n)) => { -- cgit 1.4.1-3-g733a5