Skip to content

Commit 949015a

Browse files
committed
float: Update some constants to pub(crate)
These constants can be useful outside of their current module. Make them `pub(crate)` to allow for this.
1 parent e7020f6 commit 949015a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

library/core/src/num/f32.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -491,13 +491,13 @@ impl f32 {
491491
pub const NEG_INFINITY: f32 = -1.0_f32 / 0.0_f32;
492492

493493
/// Sign bit
494-
const SIGN_MASK: u32 = 0x8000_0000;
494+
pub(crate) const SIGN_MASK: u32 = 0x8000_0000;
495495

496496
/// Exponent mask
497-
const EXP_MASK: u32 = 0x7f80_0000;
497+
pub(crate) const EXP_MASK: u32 = 0x7f80_0000;
498498

499499
/// Mantissa mask
500-
const MAN_MASK: u32 = 0x007f_ffff;
500+
pub(crate) const MAN_MASK: u32 = 0x007f_ffff;
501501

502502
/// Minimum representable positive value (min subnormal)
503503
const TINY_BITS: u32 = 0x1;

library/core/src/num/f64.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -490,13 +490,13 @@ impl f64 {
490490
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
491491

492492
/// Sign bit
493-
const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
493+
pub(crate) const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
494494

495495
/// Exponent mask
496-
const EXP_MASK: u64 = 0x7ff0_0000_0000_0000;
496+
pub(crate) const EXP_MASK: u64 = 0x7ff0_0000_0000_0000;
497497

498498
/// Mantissa mask
499-
const MAN_MASK: u64 = 0x000f_ffff_ffff_ffff;
499+
pub(crate) const MAN_MASK: u64 = 0x000f_ffff_ffff_ffff;
500500

501501
/// Minimum representable positive value (min subnormal)
502502
const TINY_BITS: u64 = 0x1;

0 commit comments

Comments
 (0)