about summary refs log tree commit diff
path: root/src/comp/front/token.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/comp/front/token.rs')
-rw-r--r--src/comp/front/token.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/comp/front/token.rs b/src/comp/front/token.rs
index 8c594054e40..62c6406a6b8 100644
--- a/src/comp/front/token.rs
+++ b/src/comp/front/token.rs
@@ -3,6 +3,7 @@ import util.common.ty_mach_to_str;
 import util.common.new_str_hash;
 import std._int;
 import std._uint;
+import std._str;
 
 tag binop {
     PLUS;
@@ -302,8 +303,8 @@ fn to_str(token t) -> str {
         case (LIT_CHAR(?c)) {
             // FIXME: escape and encode.
             auto tmp = "'";
-            tmp += c as u8;
-            tmp += '\'' as u8;
+            _str.push_byte(tmp, c as u8);
+            _str.push_byte(tmp, '\'' as u8);
             ret tmp;
         }