Skip to content

Commit e8cfc94

Browse files
committed
Allow a new lint failure in nightly
```text warning: function `f32_to_bits` is never used --> libm/src/math/support/float_traits.rs:367:14 | 367 | pub const fn f32_to_bits(x: f32) -> u32 { | ^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default warning: function `f64_to_bits` is never used --> libm/src/math/support/float_traits.rs:381:14 | 381 | pub const fn f64_to_bits(x: f64) -> u64 { | ^^^^^^^^^^^ warning: `libm` (lib) generated 2 warnings ``` This is a false positive, see RUST-144060.
1 parent 599f0e6 commit e8cfc94

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libm/src/math/support/float_traits.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ pub const fn f32_from_bits(bits: u32) -> f32 {
363363
}
364364

365365
/// `f32::to_bits`
366+
#[allow(dead_code)] // workaround for false positive RUST-144060
366367
#[allow(unnecessary_transmutes)] // lint appears in newer versions of Rust
367368
pub const fn f32_to_bits(x: f32) -> u32 {
368369
// SAFETY: POD cast with no preconditions
@@ -377,6 +378,7 @@ pub const fn f64_from_bits(bits: u64) -> f64 {
377378
}
378379

379380
/// `f64::to_bits`
381+
#[allow(dead_code)] // workaround for false positive RUST-144060
380382
#[allow(unnecessary_transmutes)] // lint appears in newer versions of Rust
381383
pub const fn f64_to_bits(x: f64) -> u64 {
382384
// SAFETY: POD cast with no preconditions

0 commit comments

Comments
 (0)