about summary refs log tree commit diff
path: root/src/libsyntax/print
diff options
context:
space:
mode:
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2016-02-11 09:52:55 +0100
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>2016-02-11 12:34:48 +0100
commitbfa66bb389ce1c7ce4aff09d1842b3428015bd4d (patch)
treef6252627aac7945dec962bacb43ed50186c8ab9b /src/libsyntax/print
parent625e78b7001c6e20f29928a5da8c9d21e9aed6c5 (diff)
downloadrust-bfa66bb389ce1c7ce4aff09d1842b3428015bd4d.tar.gz
rust-bfa66bb389ce1c7ce4aff09d1842b3428015bd4d.zip
[breaking-change] remove the sign from integer literals in the ast
Diffstat (limited to 'src/libsyntax/print')
-rw-r--r--src/libsyntax/print/pprust.rs12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index 2054c0fc9bd..a02a7d47d32 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -645,24 +645,16 @@ pub trait PrintState<'a> {
             }
             ast::LitInt(i, t) => {
                 match t {
-                    ast::SignedIntLit(st, ast::Plus) => {
+                    ast::SignedIntLit(st) => {
                         word(self.writer(),
                              &st.val_to_string(i as i64))
                     }
-                    ast::SignedIntLit(st, ast::Minus) => {
-                        let istr = st.val_to_string(-(i as i64));
-                        word(self.writer(),
-                             &format!("-{}", istr))
-                    }
                     ast::UnsignedIntLit(ut) => {
                         word(self.writer(), &ut.val_to_string(i))
                     }
-                    ast::UnsuffixedIntLit(ast::Plus) => {
+                    ast::UnsuffixedIntLit => {
                         word(self.writer(), &format!("{}", i))
                     }
-                    ast::UnsuffixedIntLit(ast::Minus) => {
-                        word(self.writer(), &format!("-{}", i))
-                    }
                 }
             }
             ast::LitFloat(ref f, t) => {