about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTrevor Gross <tmgross@umich.edu>2024-12-09 09:25:21 +0000
committerTrevor Gross <tmgross@umich.edu>2025-03-02 07:08:00 +0000
commita0ed304c2101b4efdaf9982189e8d6ca73690712 (patch)
tree3cfc45d0a3f61a11f9cff053f99d96957f539738
parent8c392966a013fd8a09e6b78b3c8d6e442bc278e1 (diff)
downloadrust-a0ed304c2101b4efdaf9982189e8d6ca73690712.tar.gz
rust-a0ed304c2101b4efdaf9982189e8d6ca73690712.zip
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.
-rw-r--r--library/core/src/num/f32.rs6
-rw-r--r--library/core/src/num/f64.rs6
2 files changed, 6 insertions, 6 deletions
diff --git a/library/core/src/num/f32.rs b/library/core/src/num/f32.rs
index a200fd53186..de1557ccc90 100644
--- a/library/core/src/num/f32.rs
+++ b/library/core/src/num/f32.rs
@@ -493,13 +493,13 @@ impl f32 {
     pub const NEG_INFINITY: f32 = -1.0_f32 / 0.0_f32;
 
     /// Sign bit
-    const SIGN_MASK: u32 = 0x8000_0000;
+    pub(crate) const SIGN_MASK: u32 = 0x8000_0000;
 
     /// Exponent mask
-    const EXP_MASK: u32 = 0x7f80_0000;
+    pub(crate) const EXP_MASK: u32 = 0x7f80_0000;
 
     /// Mantissa mask
-    const MAN_MASK: u32 = 0x007f_ffff;
+    pub(crate) const MAN_MASK: u32 = 0x007f_ffff;
 
     /// Minimum representable positive value (min subnormal)
     const TINY_BITS: u32 = 0x1;
diff --git a/library/core/src/num/f64.rs b/library/core/src/num/f64.rs
index de63a462b61..65b5f3b9af0 100644
--- a/library/core/src/num/f64.rs
+++ b/library/core/src/num/f64.rs
@@ -492,13 +492,13 @@ impl f64 {
     pub const NEG_INFINITY: f64 = -1.0_f64 / 0.0_f64;
 
     /// Sign bit
-    const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
+    pub(crate) const SIGN_MASK: u64 = 0x8000_0000_0000_0000;
 
     /// Exponent mask
-    const EXP_MASK: u64 = 0x7ff0_0000_0000_0000;
+    pub(crate) const EXP_MASK: u64 = 0x7ff0_0000_0000_0000;
 
     /// Mantissa mask
-    const MAN_MASK: u64 = 0x000f_ffff_ffff_ffff;
+    pub(crate) const MAN_MASK: u64 = 0x000f_ffff_ffff_ffff;
 
     /// Minimum representable positive value (min subnormal)
     const TINY_BITS: u64 = 0x1;