summary refs log tree commit diff
path: root/src/libsyntax/print
diff options
context:
space:
mode:
authorLindsey Kuper <lindsey@rockstargirl.org>2012-06-14 19:41:40 -0700
committerLindsey Kuper <lindsey@rockstargirl.org>2012-06-14 20:24:36 -0700
commit77e6573929702731bc0bd2c41724e6a587c7f268 (patch)
tree65e5f479feb0dc97e4cf2b5c22b1ac27d74386c0 /src/libsyntax/print
parentd953462d031db6c6fd632456a5533be818a0db1c (diff)
downloadrust-77e6573929702731bc0bd2c41724e6a587c7f268.tar.gz
rust-77e6573929702731bc0bd2c41724e6a587c7f268.zip
Further work on integer literal suffix inference (#1425)
In this commit:

  * Change the lit_int_unsuffixed AST node to not carry a type, since
    it doesn't need one

  * Don't print "(unsuffixed)" when pretty-printing unsuffixed integer
    literals

  * Just print "I" instead of "(integral)" for integral type variables

  * Set up trans to use the information that will be gathered during
    typeck to construct the appropriate constants for unsuffixed int
    literals

  * Add logic for handling int_ty_sets in typeck::infer

  * Clean up unnecessary code in typeck::infer

  * Add missing mk_ functions to middle::ty

  * Add ty_var_integral to a few of the type utility functions it was
    missing from in middle::ty
Diffstat (limited to 'src/libsyntax/print')
-rw-r--r--src/libsyntax/print/pprust.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index a63e3139b5b..43b498eae62 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -1628,15 +1628,11 @@ fn print_literal(s: ps, &&lit: @ast::lit) {
              u64::to_str(u, 10u)
              + ast_util::uint_ty_to_str(t));
       }
-      ast::lit_int_unsuffixed(i, t) {
+      ast::lit_int_unsuffixed(i) {
         if i < 0_i64 {
-            word(s.s,
-                 "-" + u64::to_str(-i as u64, 10u)
-                 + ast_util::int_ty_to_str(t));
+            word(s.s, "-" + u64::to_str(-i as u64, 10u));
         } else {
-            word(s.s,
-                 u64::to_str(i as u64, 10u)
-                 + ast_util::int_ty_to_str(t));
+            word(s.s, u64::to_str(i as u64, 10u));
         }
       }
       ast::lit_float(f, t) {