Skip to content

Commit f108fce

Browse files
committed
Make the result of Literal::string() more readable
Closes #45076
1 parent ac76206 commit f108fce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libproc_macro/lib.rs

+1-1
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)