Skip to content

Commit c22b848

Browse files
committed
libm: Update for new warn-by-default clippy lints
Silence the approximate constant lint because it is noisy and not always correct. `single_component_path_imports` is also not accurate when built as part of `compiler-builtins`, so that needs to be `allow`ed as well.
1 parent 71f73a5 commit c22b848

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

libm/src/math/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(clippy::approx_constant)] // many false positives
2+
13
macro_rules! force_eval {
24
($e:expr) => {
35
unsafe { ::core::ptr::read_volatile(&$e) }

libm/src/math/support/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ mod int_traits;
1111

1212
#[allow(unused_imports)]
1313
pub use big::{i256, u256};
14-
#[allow(unused_imports)]
14+
// Clippy seems to have a false positive
15+
#[allow(unused_imports, clippy::single_component_path_imports)]
1516
pub(crate) use cfg_if;
1617
pub use env::{FpResult, Round, Status};
1718
#[allow(unused_imports)]

0 commit comments

Comments
 (0)