about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2014-01-15 17:15:39 -0800
committerHuon Wilson <dbau.pp+github@gmail.com>2014-02-02 01:44:48 +1100
commitb496d7bec2a79feab092e6b4e251f7b0cee2a6a6 (patch)
tree30bc26c3763372bb231dc24f7e34d666aaa9a6fb /src/libsyntax/parse/parser.rs
parent8d6ef2e1b198461fde48565c7efdf92a83a33abd (diff)
downloadrust-b496d7bec2a79feab092e6b4e251f7b0cee2a6a6.tar.gz
rust-b496d7bec2a79feab092e6b4e251f7b0cee2a6a6.zip
libsyntax: Make float literals not use `@str`
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 636dc504ff2..e86873d6418 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1405,9 +1405,12 @@ impl Parser {
             token::LIT_INT(i, it) => LitInt(i, it),
             token::LIT_UINT(u, ut) => LitUint(u, ut),
             token::LIT_INT_UNSUFFIXED(i) => LitIntUnsuffixed(i),
-            token::LIT_FLOAT(s, ft) => LitFloat(self.id_to_str(s), ft),
-            token::LIT_FLOAT_UNSUFFIXED(s) =>
-                LitFloatUnsuffixed(self.id_to_str(s)),
+            token::LIT_FLOAT(s, ft) => {
+                LitFloat(self.id_to_interned_str(s), ft)
+            }
+            token::LIT_FLOAT_UNSUFFIXED(s) => {
+                LitFloatUnsuffixed(self.id_to_interned_str(s))
+            }
             token::LIT_STR(s) => {
                 LitStr(self.id_to_interned_str(s), ast::CookedStr)
             }