Update Rust

This commit is contained in:
Chris Wong 2015-02-09 15:03:54 +13:00
parent 1c0d5e9c31
commit 7e6528550d

View file

@ -237,14 +237,14 @@ fn lit_to_string(cx: &ExtCtxt, lit: Lit, minus: bool) -> Option<String> {
result.push('-');
}
match lit.node {
LitStr(s, _) => result.push_str(s.get()),
LitStr(s, _) => result.push_str(&s),
LitBinary(..) | LitByte(..) => {
cx.span_err(lit.span, "cannot splice binary data");
return None;
},
LitChar(c) => result.push(c),
LitInt(x, _) => result.push_str(&x.to_string()),
LitFloat(s, _) | LitFloatUnsuffixed(s) => result.push_str(s.get()),
LitFloat(s, _) | LitFloatUnsuffixed(s) => result.push_str(&s),
LitBool(b) => result.push_str(if b { "true" } else { "false" }),
};
Some(result)