|
1 | 1 | use core::ops::{Add, Mul, Sub}; |
| 2 | +#[cfg(has_i128)] |
| 3 | +use core::{i128, u128}; |
| 4 | +use core::{i16, i32, i64, i8, isize}; |
| 5 | +use core::{u16, u32, u64, u8, usize}; |
2 | 6 |
|
3 | 7 | macro_rules! overflowing_impl { |
4 | 8 | ($trait_name:ident, $method:ident, $t:ty) => { |
@@ -89,9 +93,9 @@ fn test_overflowing_traits() { |
89 | 93 | a.overflowing_mul(&b) |
90 | 94 | } |
91 | 95 | assert_eq!(overflowing_add(5i16, 2), (7, false)); |
92 | | - assert_eq!(overflowing_add(std::i16::MAX, 1), (std::i16::MIN, true)); |
| 96 | + assert_eq!(overflowing_add(i16::MAX, 1), (i16::MIN, true)); |
93 | 97 | assert_eq!(overflowing_sub(5i16, 2), (3, false)); |
94 | | - assert_eq!(overflowing_sub(std::i16::MIN, 1), (std::i16::MAX, true)); |
| 98 | + assert_eq!(overflowing_sub(i16::MIN, 1), (i16::MAX, true)); |
95 | 99 | assert_eq!(overflowing_mul(5i16, 2), (10, false)); |
96 | 100 | assert_eq!(overflowing_mul(1_000_000_000i32, 10), (1410065408, true)); |
97 | 101 | } |
0 commit comments