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('-'); result.push('-');
} }
match lit.node { match lit.node {
LitStr(s, _) => result.push_str(s.get()), LitStr(s, _) => result.push_str(&s),
LitBinary(..) | LitByte(..) => { LitBinary(..) | LitByte(..) => {
cx.span_err(lit.span, "cannot splice binary data"); cx.span_err(lit.span, "cannot splice binary data");
return None; return None;
}, },
LitChar(c) => result.push(c), LitChar(c) => result.push(c),
LitInt(x, _) => result.push_str(&x.to_string()), 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" }), LitBool(b) => result.push_str(if b { "true" } else { "false" }),
}; };
Some(result) Some(result)