@@ -98,7 +98,7 @@ macro_rules! impl_int {
98
98
}
99
99
}
100
100
101
- impl_int ! ( u16 , i16 ; u32 , i32 ; u64 , i64 ) ;
101
+ impl_int ! ( u32 , i32 ; u64 , i64 ) ;
102
102
103
103
/// Floating point types.
104
104
pub trait Float :
@@ -147,12 +147,12 @@ pub trait Float:
147
147
}
148
148
149
149
macro_rules! impl_float {
150
- ( $( $fty: ty, $ity: ty) ;+) => {
150
+ ( $( $fty: ty, $ity: ty, $bits : literal ) ;+) => {
151
151
$(
152
152
impl Float for $fty {
153
153
type Int = $ity;
154
154
type SInt = <Self :: Int as Int >:: Signed ;
155
- const BITS : u32 = <$ity> :: BITS ;
155
+ const BITS : u32 = $bits ;
156
156
const MAN_BITS : u32 = Self :: MANTISSA_DIGITS - 1 ;
157
157
const MAN_MASK : Self :: Int = ( Self :: Int :: ONE << Self :: MAN_BITS ) - Self :: Int :: ONE ;
158
158
const SIGN_MASK : Self :: Int = Self :: Int :: ONE << ( Self :: BITS -1 ) ;
@@ -168,7 +168,7 @@ macro_rules! impl_float {
168
168
}
169
169
}
170
170
171
- impl_float ! ( f16 , u16 ; f32 , u32 ; f64 , u64 ) ;
171
+ impl_float ! ( f32 , u32 , 32 ; f64 , u64 , 64 ) ;
172
172
173
173
/// A test generator. Should provide an iterator that produces unique patterns to parse.
174
174
///
0 commit comments