Skip to content

Commit dc73bed

Browse files
committed
Cleanup FIXMEs
1 parent abff2e0 commit dc73bed

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
@@ -368,7 +368,6 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
368368
ast::IntTy::I16 => ConstInt::I16(i16::min_value()),
369369
ast::IntTy::I32 => ConstInt::I32(i32::min_value()),
370370
ast::IntTy::I64 => ConstInt::I64(i64::min_value()),
371-
// FIXME: i128
372371
ast::IntTy::I128 => ConstInt::I128(i128::min_value()),
373372
ast::IntTy::Is => {
374373
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
@@ -1209,17 +1209,6 @@ impl IntTy {
12091209
format!("{}{}", val as u128, self.ty_to_string())
12101210
}
12111211

1212-
pub fn ty_max(&self) -> u64 {
1213-
match *self {
1214-
IntTy::I8 => 0x80,
1215-
IntTy::I16 => 0x8000,
1216-
IntTy::Is | IntTy::I32 => 0x80000000, // FIXME: actually ni about Is
1217-
IntTy::I64 => 0x8000000000000000,
1218-
// FIXME: i128
1219-
IntTy::I128 => !0u64,
1220-
}
1221-
}
1222-
12231212
pub fn bit_width(&self) -> Option<usize> {
12241213
Some(match *self {
12251214
IntTy::Is => return None,
@@ -1258,17 +1247,6 @@ impl UintTy {
12581247
format!("{}{}", val, self.ty_to_string())
12591248
}
12601249

1261-
pub fn ty_max(&self) -> u64 {
1262-
match *self {
1263-
UintTy::U8 => 0xff,
1264-
UintTy::U16 => 0xffff,
1265-
UintTy::Us | UintTy::U32 => 0xffffffff, // FIXME: actually ni about Us
1266-
UintTy::U64 => 0xffffffffffffffff,
1267-
// FIXME: i128
1268-
UintTy::U128 => 0xffffffffffffffff,
1269-
}
1270-
}
1271-
12721250
pub fn bit_width(&self) -> Option<usize> {
12731251
Some(match *self {
12741252
UintTy::Us => return None,

0 commit comments

Comments
 (0)