Skip to content

Commit a0ed304

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 8c39296 commit a0ed304

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

library/core/src/num/f32.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -493,13 +493,13 @@ impl f32 {
493493
pub const NEG_INFINITY: f32 = -1.0_f32 / 0.0_f32;
494494

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

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

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

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

library/core/src/num/f64.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,13 +492,13 @@ impl f64 {
492492
pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
493493

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

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

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

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

0 commit comments

Comments
 (0)