Skip to content

Commit ff94eb2

Browse files
committed
Cleanup FIXMEs
1 parent bdbc696 commit ff94eb2

File tree

3 files changed

+0
-28
lines changed

3 files changed

+0
-28
lines changed

src/librustc_const_math/int.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ pub enum ConstInt {
3131
U64(u64),
3232
U128(u128),
3333
Usize(ConstUsize),
34-
// FIXME: i128
3534
Infer(u128),
3635
InferSigned(i128),
3736
}
@@ -56,7 +55,6 @@ macro_rules! bounds {
5655
mod ubounds {
5756
#![allow(dead_code)]
5857
use rustc_i128::{u128, i128};
59-
// FIXME: min are problably all wrong for signed here.
6058
bounds!{u128: 0,
6159
i8 I8MIN I8MAX i16 I16MIN I16MAX i32 I32MIN I32MAX i64 I64MIN I64MAX i128 I128MIN I128MAX
6260
u8 U8MIN U8MAX u16 U16MIN U16MAX u32 U32MIN U32MAX u64 U64MIN U64MAX u128 U128MIN U128MAX
@@ -155,7 +153,6 @@ impl ConstInt {
155153
I16(i) if i < 0 => InferSigned(i as i128),
156154
I32(i) if i < 0 => InferSigned(i as i128),
157155
I64(i) if i < 0 => InferSigned(i as i128),
158-
// FIXME: 1128, compare with i128
159156
I128(i) if i < 0 => InferSigned(i as i128),
160157
Isize(Is16(i)) if i < 0 => InferSigned(i as i128),
161158
Isize(Is32(i)) if i < 0 => InferSigned(i as i128),
@@ -165,7 +162,6 @@ impl ConstInt {
165162
I16(i) => Infer(i as u128),
166163
I32(i) => Infer(i as u128),
167164
I64(i) => Infer(i as u128),
168-
// FIXME: i128
169165
I128(i) => Infer(i as u128),
170166
Isize(Is16(i)) => Infer(i as u128),
171167
Isize(Is32(i)) => Infer(i as u128),
@@ -174,7 +170,6 @@ impl ConstInt {
174170
U16(i) => Infer(i as u128),
175171
U32(i) => Infer(i as u128),
176172
U64(i) => Infer(i as u128),
177-
// FIXME: i128
178173
U128(i) => Infer(i as u128),
179174
Usize(Us16(i)) => Infer(i as u128),
180175
Usize(Us32(i)) => Infer(i as u128),

src/librustc_mir/build/expr/as_rvalue.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
371371
ast::IntTy::I16 => ConstInt::I16(i16::min_value()),
372372
ast::IntTy::I32 => ConstInt::I32(i32::min_value()),
373373
ast::IntTy::I64 => ConstInt::I64(i64::min_value()),
374-
// FIXME: i128
375374
ast::IntTy::I128 => ConstInt::I128(i128::min_value()),
376375
ast::IntTy::Is => {
377376
let int_ty = self.hir.tcx().sess.target.int_type;

src/libsyntax/ast.rs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,17 +1292,6 @@ impl IntTy {
12921292
format!("{}{}", val as u128, self.ty_to_string())
12931293
}
12941294

1295-
pub fn ty_max(&self) -> u64 {
1296-
match *self {
1297-
IntTy::I8 => 0x80,
1298-
IntTy::I16 => 0x8000,
1299-
IntTy::Is | IntTy::I32 => 0x80000000, // FIXME: actually ni about Is
1300-
IntTy::I64 => 0x8000000000000000,
1301-
// FIXME: i128
1302-
IntTy::I128 => !0u64,
1303-
}
1304-
}
1305-
13061295
pub fn bit_width(&self) -> Option<usize> {
13071296
Some(match *self {
13081297
IntTy::Is => return None,
@@ -1341,17 +1330,6 @@ impl UintTy {
13411330
format!("{}{}", val, self.ty_to_string())
13421331
}
13431332

1344-
pub fn ty_max(&self) -> u64 {
1345-
match *self {
1346-
UintTy::U8 => 0xff,
1347-
UintTy::U16 => 0xffff,
1348-
UintTy::Us | UintTy::U32 => 0xffffffff, // FIXME: actually ni about Us
1349-
UintTy::U64 => 0xffffffffffffffff,
1350-
// FIXME: i128
1351-
UintTy::U128 => 0xffffffffffffffff,
1352-
}
1353-
}
1354-
13551333
pub fn bit_width(&self) -> Option<usize> {
13561334
Some(match *self {
13571335
UintTy::Us => return None,

0 commit comments

Comments
 (0)