@@ -98,7 +98,7 @@ macro_rules! impl_int {
9898 }
9999}
100100
101- impl_int ! ( u32 , i32 ; u64 , i64 ) ;
101+ impl_int ! ( u16 , i16 ; u32 , i32 ; u64 , i64 ) ;
102102
103103/// Floating point types.
104104pub trait Float :
@@ -147,12 +147,12 @@ pub trait Float:
147147}
148148
149149macro_rules! impl_float {
150- ( $( $fty: ty, $ity: ty, $bits : literal ) ;+) => {
150+ ( $( $fty: ty, $ity: ty) ;+) => {
151151 $(
152152 impl Float for $fty {
153153 type Int = $ity;
154154 type SInt = <Self :: Int as Int >:: Signed ;
155- const BITS : u32 = $bits ;
155+ const BITS : u32 = <$ity> :: BITS ;
156156 const MAN_BITS : u32 = Self :: MANTISSA_DIGITS - 1 ;
157157 const MAN_MASK : Self :: Int = ( Self :: Int :: ONE << Self :: MAN_BITS ) - Self :: Int :: ONE ;
158158 const SIGN_MASK : Self :: Int = Self :: Int :: ONE << ( Self :: BITS -1 ) ;
@@ -168,7 +168,7 @@ macro_rules! impl_float {
168168 }
169169}
170170
171- impl_float ! ( f32 , u32 , 32 ; f64 , u64 , 64 ) ;
171+ impl_float ! ( f16 , u16 ; f32 , u32 ; f64 , u64 ) ;
172172
173173/// A test generator. Should provide an iterator that produces unique patterns to parse.
174174///
0 commit comments