diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-01-15 17:15:39 -0800 |
|---|---|---|
| committer | Huon Wilson <dbau.pp+github@gmail.com> | 2014-02-02 01:44:48 +1100 |
| commit | b496d7bec2a79feab092e6b4e251f7b0cee2a6a6 (patch) | |
| tree | 30bc26c3763372bb231dc24f7e34d666aaa9a6fb /src/libsyntax/ext | |
| parent | 8d6ef2e1b198461fde48565c7efdf92a83a33abd (diff) | |
| download | rust-b496d7bec2a79feab092e6b4e251f7b0cee2a6a6.tar.gz rust-b496d7bec2a79feab092e6b4e251f7b0cee2a6a6.zip | |
libsyntax: Make float literals not use `@str`
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/concat.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libsyntax/ext/concat.rs b/src/libsyntax/ext/concat.rs index f570ca4c1bf..c13f9bf92af 100644 --- a/src/libsyntax/ext/concat.rs +++ b/src/libsyntax/ext/concat.rs @@ -29,12 +29,11 @@ pub fn expand_syntax_ext(cx: &mut base::ExtCtxt, match e.node { ast::ExprLit(lit) => { match lit.node { - ast::LitStr(ref s, _) => { + ast::LitStr(ref s, _) | + ast::LitFloat(ref s, _) | + ast::LitFloatUnsuffixed(ref s) => { accumulator.push_str(s.get()); } - ast::LitFloat(s, _) | ast::LitFloatUnsuffixed(s) => { - accumulator.push_str(s); - } ast::LitChar(c) => { accumulator.push_char(char::from_u32(c).unwrap()); } |
