Skip to content

Commit

Permalink
Make the result of Literal::string() more readable
Browse files Browse the repository at this point in the history
Closes #45076
  • Loading branch information
lambda-fairy committed Oct 8, 2017
1 parent ac76206 commit f108fce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libproc_macro/lib.rs
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 f108fce

Please sign in to comment.