Skip to content

Commit

Permalink
Rollup merge of rust-lang#45101 - lfairy:proc-macro-string-escape, r=…
Browse files Browse the repository at this point in the history
…jseyfried

Make the result of `Literal::string()` more readable

Closes rust-lang#45076
  • Loading branch information
kennytm committed Oct 10, 2017
2 parents 2f4dd15 + f108fce commit bedce1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libproc_macro/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ impl Literal {
pub fn string(string: &str) -> Literal {
let mut escaped = String::new();
for ch in string.chars() {
escaped.extend(ch.escape_unicode());
escaped.extend(ch.escape_debug());
}
Literal(token::Literal(token::Lit::Str_(Symbol::intern(&escaped)), None))
}
Expand Down

0 comments on commit bedce1e

Please sign in to comment.