syntax: convert LitBinary from @[u8] to Rc<~[u8]>.

This commit is contained in:
Huon Wilson 2014-02-01 15:54:41 +11:00
parent b972cadf61
commit 891ada9be1
5 changed files with 8 additions and 9 deletions

View file

@ -1151,7 +1151,7 @@ impl ToSource for syntax::codemap::Span {
fn lit_to_str(lit: &ast::Lit) -> ~str {
match lit.node {
ast::LitStr(ref st, _) => st.get().to_owned(),
ast::LitBinary(data) => format!("{:?}", data.as_slice()),
ast::LitBinary(ref data) => format!("{:?}", data.borrow().as_slice()),
ast::LitChar(c) => ~"'" + std::char::from_u32(c).unwrap().to_str() + "'",
ast::LitInt(i, _t) => i.to_str(),
ast::LitUint(u, _t) => u.to_str(),