const_ops/impls/
sub.rs

1use crate::Sub;
2
3macro_rules! sub_impl {
4    ($($t:ty)*) => ($(
5        impl const Sub for $t {
6            type Output = $t;
7
8            #[inline]
9            fn sub(self, other: $t) -> $t { self - other }
10        }
11    )*)
12}
13
14sub_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }