about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorKevin Butler <haqkrs@gmail.com>2014-04-11 01:21:01 +0100
committerKevin Butler <haqkrs@gmail.com>2014-04-13 02:39:19 +0100
commit888517df4d5c83423f9722b32c6fe1b113b58208 (patch)
tree272af603839a5c3ada415b5d43678b8d12c2aded /src/libsyntax/parse
parentab0d8472777d2359492dfdee1d21230fbf144f70 (diff)
downloadrust-888517df4d5c83423f9722b32c6fe1b113b58208.tar.gz
rust-888517df4d5c83423f9722b32c6fe1b113b58208.zip
libsyntax: update helper to stringify TyU* and TyI* to take into account having a value.
Fixes #13359.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/token.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index baade21d942..101c748b1ec 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -201,12 +201,8 @@ pub fn to_str(t: &Token) -> ~str {
           res.push_char('\'');
           res.into_owned()
       }
-      LIT_INT(i, t) => {
-          i.to_str() + ast_util::int_ty_to_str(t)
-      }
-      LIT_UINT(u, t) => {
-          u.to_str() + ast_util::uint_ty_to_str(t)
-      }
+      LIT_INT(i, t) => ast_util::int_ty_to_str(t, Some(i)),
+      LIT_UINT(u, t) => ast_util::uint_ty_to_str(t, Some(u)),
       LIT_INT_UNSUFFIXED(i) => { i.to_str() }
       LIT_FLOAT(s, t) => {
         let mut body = StrBuf::from_str(get_ident(s).get());