From 54587bdccb7b6771cfc704a30fc0ef2c65824a15 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Wed, 16 Mar 2011 14:58:02 -0700 Subject: Switch all vases of vec += elt to vec += vec. Prohibit former in rustboot. Tweak std lib vec fns in process. --- src/comp/front/token.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/comp/front/token.rs') diff --git a/src/comp/front/token.rs b/src/comp/front/token.rs index 8c594054..62c6406a 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; } -- cgit v1.2.3