diff options
| author | Kevin Butler <haqkrs@gmail.com> | 2014-04-11 01:21:01 +0100 |
|---|---|---|
| committer | Kevin Butler <haqkrs@gmail.com> | 2014-04-13 02:39:19 +0100 |
| commit | 888517df4d5c83423f9722b32c6fe1b113b58208 (patch) | |
| tree | 272af603839a5c3ada415b5d43678b8d12c2aded /src/libsyntax/parse | |
| parent | ab0d8472777d2359492dfdee1d21230fbf144f70 (diff) | |
| download | rust-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.rs | 8 |
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()); |
