diff options
| author | Michael Woerister <michaelwoerister@posteo.net> | 2015-11-23 15:59:36 +0100 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo.net> | 2015-11-23 15:59:36 +0100 |
| commit | 3be1d8ca7d9d9df60a38106d6c8f5d12597cbafc (patch) | |
| tree | 62773125a66ce62abf88660462427f53deb60ee6 /src/libsyntax/print | |
| parent | 4891c00634f209bcc66d7f00bc507eb35a0fe6a8 (diff) | |
| download | rust-3be1d8ca7d9d9df60a38106d6c8f5d12597cbafc.tar.gz rust-3be1d8ca7d9d9df60a38106d6c8f5d12597cbafc.zip | |
Avoid some code duplication around getting names of numeric types.
Diffstat (limited to 'src/libsyntax/print')
| -rw-r--r-- | src/libsyntax/print/pprust.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index e9c716017c0..6de86de9c54 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -651,15 +651,15 @@ pub trait PrintState<'a> { match t { ast::SignedIntLit(st, ast::Plus) => { word(self.writer(), - &ast_util::int_ty_to_string(st, Some(i as i64))) + &ast_util::int_val_to_string(st, i as i64)) } ast::SignedIntLit(st, ast::Minus) => { - let istr = ast_util::int_ty_to_string(st, Some(-(i as i64))); + let istr = ast_util::int_val_to_string(st, -(i as i64)); word(self.writer(), &format!("-{}", istr)) } ast::UnsignedIntLit(ut) => { - word(self.writer(), &ast_util::uint_ty_to_string(ut, Some(i))) + word(self.writer(), &ast_util::uint_val_to_string(ut, i)) } ast::UnsuffixedIntLit(ast::Plus) => { word(self.writer(), &format!("{}", i)) |
