1
Fork 0

Deal with the fallout of string stabilization

This commit is contained in:
Alex Crichton 2014-09-22 08:28:35 -07:00
parent 31be3319bf
commit 50375139e2
13 changed files with 88 additions and 74 deletions

View file

@ -1961,9 +1961,9 @@ fn lit_to_string(lit: &ast::Lit) -> String {
ast::LitByte(b) => {
let mut res = String::from_str("b'");
(b as char).escape_default(|c| {
res.push_char(c);
res.push(c);
});
res.push_char('\'');
res.push('\'');
res
},
ast::LitChar(c) => format!("'{}'", c),