about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSimonas Kazlauskas <git@kazlauskas.me>2016-08-24 02:37:19 +0300
committerest31 <MTest31@outlook.com>2016-12-30 15:17:25 +0100
commit4e2b946e6539b4866c672cda6958fc1a2fe80687 (patch)
tree472436b596dbf5a5df365d16474ac04db1e5a6c7
parentd4d5be18b702b5fd8b38b67d503860f788a14acd (diff)
downloadrust-4e2b946e6539b4866c672cda6958fc1a2fe80687.tar.gz
rust-4e2b946e6539b4866c672cda6958fc1a2fe80687.zip
Cleanup FIXMEs
-rw-r--r--src/librustc_const_math/int.rs5
-rw-r--r--src/librustc_mir/build/expr/as_rvalue.rs1
-rw-r--r--src/libsyntax/ast.rs22
3 files changed, 0 insertions, 28 deletions
diff --git a/src/librustc_const_math/int.rs b/src/librustc_const_math/int.rs
index a1b6ecf153a..7af61d6f274 100644
--- a/src/librustc_const_math/int.rs
+++ b/src/librustc_const_math/int.rs
@@ -31,7 +31,6 @@ pub enum ConstInt {
     U64(u64),
     U128(u128),
     Usize(ConstUsize),
-    // FIXME: i128
     Infer(u128),
     InferSigned(i128),
 }
@@ -56,7 +55,6 @@ macro_rules! bounds {
 mod ubounds {
     #![allow(dead_code)]
     use rustc_i128::{u128, i128};
-    // FIXME: min are problably all wrong for signed here.
     bounds!{u128: 0,
         i8 I8MIN I8MAX i16 I16MIN I16MAX i32 I32MIN I32MAX i64 I64MIN I64MAX i128 I128MIN I128MAX
         u8 U8MIN U8MAX u16 U16MIN U16MAX u32 U32MIN U32MAX u64 U64MIN U64MAX u128 U128MIN U128MAX
@@ -155,7 +153,6 @@ impl ConstInt {
             I16(i) if i < 0 => InferSigned(i as i128),
             I32(i) if i < 0 => InferSigned(i as i128),
             I64(i) if i < 0 => InferSigned(i as i128),
-            // FIXME: 1128, compare with i128
             I128(i) if i < 0 => InferSigned(i as i128),
             Isize(Is16(i)) if i < 0 => InferSigned(i as i128),
             Isize(Is32(i)) if i < 0 => InferSigned(i as i128),
@@ -165,7 +162,6 @@ impl ConstInt {
             I16(i) => Infer(i as u128),
             I32(i) => Infer(i as u128),
             I64(i) => Infer(i as u128),
-            // FIXME: i128
             I128(i) => Infer(i as u128),
             Isize(Is16(i)) => Infer(i as u128),
             Isize(Is32(i)) => Infer(i as u128),
@@ -174,7 +170,6 @@ impl ConstInt {
             U16(i) => Infer(i as u128),
             U32(i) => Infer(i as u128),
             U64(i) => Infer(i as u128),
-            // FIXME: i128
             U128(i) => Infer(i as u128),
             Usize(Us16(i)) => Infer(i as u128),
             Usize(Us32(i)) => Infer(i as u128),
diff --git a/src/librustc_mir/build/expr/as_rvalue.rs b/src/librustc_mir/build/expr/as_rvalue.rs
index 0aad96d27cc..8199a08c852 100644
--- a/src/librustc_mir/build/expr/as_rvalue.rs
+++ b/src/librustc_mir/build/expr/as_rvalue.rs
@@ -375,7 +375,6 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
                     ast::IntTy::I16 => ConstInt::I16(i16::min_value()),
                     ast::IntTy::I32 => ConstInt::I32(i32::min_value()),
                     ast::IntTy::I64 => ConstInt::I64(i64::min_value()),
-                    // FIXME: i128
                     ast::IntTy::I128 => ConstInt::I128(i128::min_value()),
                     ast::IntTy::Is => {
                         let int_ty = self.hir.tcx().sess.target.int_type;
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index d1257a02a58..60402fe1a66 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -1207,17 +1207,6 @@ impl IntTy {
         format!("{}{}", val as u128, self.ty_to_string())
     }
 
-    pub fn ty_max(&self) -> u64 {
-        match *self {
-            IntTy::I8 => 0x80,
-            IntTy::I16 => 0x8000,
-            IntTy::Is | IntTy::I32 => 0x80000000, // FIXME: actually ni about Is
-            IntTy::I64 => 0x8000000000000000,
-            // FIXME: i128
-            IntTy::I128 => !0u64,
-        }
-    }
-
     pub fn bit_width(&self) -> Option<usize> {
         Some(match *self {
             IntTy::Is => return None,
@@ -1256,17 +1245,6 @@ impl UintTy {
         format!("{}{}", val, self.ty_to_string())
     }
 
-    pub fn ty_max(&self) -> u64 {
-        match *self {
-            UintTy::U8 => 0xff,
-            UintTy::U16 => 0xffff,
-            UintTy::Us | UintTy::U32 => 0xffffffff, // FIXME: actually ni about Us
-            UintTy::U64 => 0xffffffffffffffff,
-            // FIXME: i128
-            UintTy::U128 => 0xffffffffffffffff,
-        }
-    }
-
     pub fn bit_width(&self) -> Option<usize> {
         Some(match *self {
             UintTy::Us => return None,