about summary refs log tree commit diff
path: root/src/libsyntax/attr
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-02-12 23:30:16 +0000
committerbors <bors@rust-lang.org>2019-02-12 23:30:16 +0000
commit0f949c2fcc696d0260a99196d5e5400c59a26a54 (patch)
tree3983d71e145a23778a0f394871d959360f35d5fb /src/libsyntax/attr
parentb244f61b77c42d7be695afd7901ee4418559e518 (diff)
parenteb158f93505dbc265787ac671cbc728c80f8a39d (diff)
Auto merge of #58051 - SimonSapin:str_escape, r=alexcrichton
Stabilize str::escape_* methods with new return types…

… that implement `Display` and `Iterator<Item=char>`, as proposed in FCP: https://github.com/rust-lang/rust/issues/27791#issuecomment-376864727
Diffstat (limited to 'src/libsyntax/attr')
-rw-r--r--src/libsyntax/attr/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/attr/mod.rs b/src/libsyntax/attr/mod.rs
index a4f5449ec54..29e86e0ecee 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)) => {