diff options
| author | Trevor Gross <tmgross@umich.edu> | 2025-07-26 16:51:58 -0500 |
|---|---|---|
| committer | Trevor Gross <t.gross35@gmail.com> | 2025-07-26 20:21:35 -0500 |
| commit | 474315828b5a6eca321b2e2816829ccd530b210b (patch) | |
| tree | 04536f50037d16773870b328323e8a1cc15b0903 /library/compiler-builtins | |
| parent | 9dad77f337745e1aeed4337dcc25549be053eeb5 (diff) | |
| download | rust-474315828b5a6eca321b2e2816829ccd530b210b.tar.gz rust-474315828b5a6eca321b2e2816829ccd530b210b.zip | |
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.
Diffstat (limited to 'library/compiler-builtins')
| -rw-r--r-- | library/compiler-builtins/libm/src/math/mod.rs | 2 | ||||
| -rw-r--r-- | library/compiler-builtins/libm/src/math/support/mod.rs | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/library/compiler-builtins/libm/src/math/mod.rs b/library/compiler-builtins/libm/src/math/mod.rs index ce9b8fc58bb..8eecfe5667d 100644 --- a/library/compiler-builtins/libm/src/math/mod.rs +++ b/library/compiler-builtins/libm/src/math/mod.rs @@ -1,3 +1,5 @@ +#![allow(clippy::approx_constant)] // many false positives + macro_rules! force_eval { ($e:expr) => { unsafe { ::core::ptr::read_volatile(&$e) } diff --git a/library/compiler-builtins/libm/src/math/support/mod.rs b/library/compiler-builtins/libm/src/math/support/mod.rs index 2e7edd03c42..b2d7bd8d556 100644 --- a/library/compiler-builtins/libm/src/math/support/mod.rs +++ b/library/compiler-builtins/libm/src/math/support/mod.rs @@ -11,7 +11,8 @@ mod int_traits; #[allow(unused_imports)] pub use big::{i256, u256}; -#[allow(unused_imports)] +// Clippy seems to have a false positive +#[allow(unused_imports, clippy::single_component_path_imports)] pub(crate) use cfg_if; pub use env::{FpResult, Round, Status}; #[allow(unused_imports)] |
