|
1 | 1 | use core::num::Wrapping; |
2 | 2 | use core::{f32, f64}; |
3 | | -#[cfg(has_i128)] |
4 | | -use core::{i128, u128}; |
5 | | -use core::{i16, i32, i64, i8, isize}; |
6 | | -use core::{u16, u32, u64, u8, usize}; |
| 3 | +use core::{i128, i16, i32, i64, i8, isize}; |
| 4 | +use core::{u128, u16, u32, u64, u8, usize}; |
7 | 5 |
|
8 | 6 | /// Numbers which have upper and lower bounds |
9 | 7 | pub trait Bounded { |
@@ -61,15 +59,13 @@ bounded_impl!(u8, u8::MIN, u8::MAX); |
61 | 59 | bounded_impl!(u16, u16::MIN, u16::MAX); |
62 | 60 | bounded_impl!(u32, u32::MIN, u32::MAX); |
63 | 61 | bounded_impl!(u64, u64::MIN, u64::MAX); |
64 | | -#[cfg(has_i128)] |
65 | 62 | bounded_impl!(u128, u128::MIN, u128::MAX); |
66 | 63 |
|
67 | 64 | bounded_impl!(isize, isize::MIN, isize::MAX); |
68 | 65 | bounded_impl!(i8, i8::MIN, i8::MAX); |
69 | 66 | bounded_impl!(i16, i16::MIN, i16::MAX); |
70 | 67 | bounded_impl!(i32, i32::MIN, i32::MAX); |
71 | 68 | bounded_impl!(i64, i64::MIN, i64::MAX); |
72 | | -#[cfg(has_i128)] |
73 | 69 | bounded_impl!(i128, i128::MIN, i128::MAX); |
74 | 70 |
|
75 | 71 | impl<T: Bounded> Bounded for Wrapping<T> { |
@@ -130,7 +126,6 @@ fn wrapping_bounded() { |
130 | 126 | test_wrapping_bounded!(usize u8 u16 u32 u64 isize i8 i16 i32 i64); |
131 | 127 | } |
132 | 128 |
|
133 | | -#[cfg(has_i128)] |
134 | 129 | #[test] |
135 | 130 | fn wrapping_bounded_i128() { |
136 | 131 | macro_rules! test_wrapping_bounded { |
|
0 commit comments