Skip to content

Commit bedce1e

Browse files
committed
Rollup merge of rust-lang#45101 - lfairy:proc-macro-string-escape, r=jseyfried
Make the result of `Literal::string()` more readable Closes rust-lang#45076
2 parents 2f4dd15 + f108fce commit bedce1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libproc_macro/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ impl Literal {
488488
pub fn string(string: &str) -> Literal {
489489
let mut escaped = String::new();
490490
for ch in string.chars() {
491-
escaped.extend(ch.escape_unicode());
491+
escaped.extend(ch.escape_debug());
492492
}
493493
Literal(token::Literal(token::Lit::Str_(Symbol::intern(&escaped)), None))
494494
}

0 commit comments

Comments
 (0)