Skip to content

Commit 9d25757

Browse files
committed
Fix some float operations to work together with the assoc consts
1 parent 22dcfa1 commit 9d25757

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/libcore/num/dec2flt/rawfp.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,15 @@ macro_rules! other_constants {
129129
($type: ident) => {
130130
const EXPLICIT_SIG_BITS: u8 = Self::SIG_BITS - 1;
131131
const MAX_EXP: i16 = (1 << (Self::EXP_BITS - 1)) - 1;
132-
const MIN_EXP: i16 = -Self::MAX_EXP + 1;
133-
const MAX_EXP_INT: i16 = Self::MAX_EXP - (Self::SIG_BITS as i16 - 1);
132+
const MIN_EXP: i16 = -<Self as RawFloat>::MAX_EXP + 1;
133+
const MAX_EXP_INT: i16 = <Self as RawFloat>::MAX_EXP - (Self::SIG_BITS as i16 - 1);
134134
const MAX_ENCODED_EXP: i16 = (1 << Self::EXP_BITS) - 1;
135-
const MIN_EXP_INT: i16 = Self::MIN_EXP - (Self::SIG_BITS as i16 - 1);
135+
const MIN_EXP_INT: i16 = <Self as RawFloat>::MIN_EXP - (Self::SIG_BITS as i16 - 1);
136136
const MAX_SIG: u64 = (1 << Self::SIG_BITS) - 1;
137137
const MIN_SIG: u64 = 1 << (Self::SIG_BITS - 1);
138138

139-
const INFINITY: Self = $crate::$type::INFINITY;
140-
const NAN: Self = $crate::$type::NAN;
139+
const INFINITY: Self = $type::INFINITY;
140+
const NAN: Self = $type::NAN;
141141
const ZERO: Self = 0.0;
142142
};
143143
}

0 commit comments

Comments
 (0)