about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2015-02-17 11:25:30 -0500
committerNiko Matsakis <niko@alum.mit.edu>2015-02-18 09:09:13 -0500
commit1f4ee20ddae447f155b0d2b25e630e9c4e0cc1aa (patch)
treef20e0903aad359bcad20800f4f12cc805ac24286 /src/libsyntax
parent01615b04c6e79fa2e99281b94e6518fb2b505486 (diff)
downloadrust-1f4ee20ddae447f155b0d2b25e630e9c4e0cc1aa.tar.gz
rust-1f4ee20ddae447f155b0d2b25e630e9c4e0cc1aa.zip
Tweak pretty printing.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast_util.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs
index b8d4c90f745..117507ad8b7 100644
--- a/src/libsyntax/ast_util.rs
+++ b/src/libsyntax/ast_util.rs
@@ -141,10 +141,7 @@ pub fn is_path(e: P<Expr>) -> bool {
 /// We want to avoid "45int" and "-3int" in favor of "45" and "-3"
 pub fn int_ty_to_string(t: IntTy, val: Option<i64>) -> String {
     let s = match t {
-        TyIs(true) if val.is_some() => "i",
-        TyIs(true) => "int",
-        TyIs(false) if val.is_some() => "is",
-        TyIs(false) => "isize",
+        TyIs(_) => "isize",
         TyI8 => "i8",
         TyI16 => "i16",
         TyI32 => "i32",
@@ -173,10 +170,7 @@ pub fn int_ty_max(t: IntTy) -> u64 {
 /// We want to avoid "42u" in favor of "42us". "42uint" is right out.
 pub fn uint_ty_to_string(t: UintTy, val: Option<u64>) -> String {
     let s = match t {
-        TyUs(true) if val.is_some() => "u",
-        TyUs(true) => "uint",
-        TyUs(false) if val.is_some() => "us",
-        TyUs(false) => "usize",
+        TyUs(_) => "usize",
         TyU8 => "u8",
         TyU16 => "u16",
         TyU32 => "u32",