mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-22 05:24:48 +00:00
parent
ac76206be4
commit
f108fce21c
@ -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))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user