Skip to content

Commit

Permalink
Delete unused associated constant from lexical
Browse files Browse the repository at this point in the history
    warning: associated constant `NEGATIVE_INFINITY_BITS` is never used
       --> src/lexical/num.rs:223:11
        |
    175 | pub trait Float: Number {
        |           ----- associated constant in this trait
    ...
    223 |     const NEGATIVE_INFINITY_BITS: Self::Unsigned;
        |           ^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: `#[warn(dead_code)]` on by default
  • Loading branch information
dtolnay committed Jun 8, 2024
1 parent fa8aa22 commit 4c894ea
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/lexical/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,6 @@ pub trait Float: Number {

/// Positive infinity as bits.
const INFINITY_BITS: Self::Unsigned;
/// Positive infinity as bits.
const NEGATIVE_INFINITY_BITS: Self::Unsigned;
/// Size of the significand (mantissa) without hidden bit.
const MANTISSA_SIZE: i32;
/// Bias of the exponent
Expand Down Expand Up @@ -320,7 +318,6 @@ impl Float for f32 {
const HIDDEN_BIT_MASK: u32 = 0x00800000;
const MANTISSA_MASK: u32 = 0x007FFFFF;
const INFINITY_BITS: u32 = 0x7F800000;
const NEGATIVE_INFINITY_BITS: u32 = Self::INFINITY_BITS | Self::SIGN_MASK;
const MANTISSA_SIZE: i32 = 23;
const EXPONENT_BIAS: i32 = 127 + Self::MANTISSA_SIZE;
const DENORMAL_EXPONENT: i32 = 1 - Self::EXPONENT_BIAS;
Expand Down Expand Up @@ -379,7 +376,6 @@ impl Float for f64 {
const HIDDEN_BIT_MASK: u64 = 0x0010000000000000;
const MANTISSA_MASK: u64 = 0x000FFFFFFFFFFFFF;
const INFINITY_BITS: u64 = 0x7FF0000000000000;
const NEGATIVE_INFINITY_BITS: u64 = Self::INFINITY_BITS | Self::SIGN_MASK;
const MANTISSA_SIZE: i32 = 52;
const EXPONENT_BIAS: i32 = 1023 + Self::MANTISSA_SIZE;
const DENORMAL_EXPONENT: i32 = 1 - Self::EXPONENT_BIAS;
Expand Down

0 comments on commit 4c894ea

Please sign in to comment.