Lines Matching refs:overflowing_add
22 fn overflowing_add(&self, v: &Self) -> (Self, bool); in overflowing_add() method
25 overflowing_impl!(OverflowingAdd, overflowing_add, u8);
26 overflowing_impl!(OverflowingAdd, overflowing_add, u16);
27 overflowing_impl!(OverflowingAdd, overflowing_add, u32);
28 overflowing_impl!(OverflowingAdd, overflowing_add, u64);
29 overflowing_impl!(OverflowingAdd, overflowing_add, usize);
31 overflowing_impl!(OverflowingAdd, overflowing_add, u128);
33 overflowing_impl!(OverflowingAdd, overflowing_add, i8);
34 overflowing_impl!(OverflowingAdd, overflowing_add, i16);
35 overflowing_impl!(OverflowingAdd, overflowing_add, i32);
36 overflowing_impl!(OverflowingAdd, overflowing_add, i64);
37 overflowing_impl!(OverflowingAdd, overflowing_add, isize);
39 overflowing_impl!(OverflowingAdd, overflowing_add, i128);
89 fn overflowing_add<T: OverflowingAdd>(a: T, b: T) -> (T, bool) { in test_overflowing_traits() function
90 a.overflowing_add(&b) in test_overflowing_traits()
98 assert_eq!(overflowing_add(5i16, 2), (7, false)); in test_overflowing_traits()
99 assert_eq!(overflowing_add(i16::MAX, 1), (i16::MIN, true)); in test_overflowing_traits()