Update Rust
This commit is contained in:
parent
1c0d5e9c31
commit
7e6528550d
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||||
|
|
Loading…
Add table
Reference in a new issue