From 44ee391300a7cc4623410145e4aca511cd2bd00e Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Thu, 5 Mar 2026 19:17:32 -0500 Subject: [PATCH] meta: Allow a clippy lint that appears in recent versions We are now getting this warning: warning: the variable `j` is used as a loop counter --> libm/src/math/rem_pio2_large.rs:268:5 | 268 | for i in 0..=m { | ^^^^^^^^^^^^^^ help: consider using: `for (j, i) in ((jv as i32) - (jx as i32)..).zip((0..=m))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop = note: `#[warn(clippy::explicit_counter_loop)]` on by default warning: `libm` (lib) generated 1 warning Where the suggestion is definitely not an improvement. --- library/compiler-builtins/libm/src/math/rem_pio2_large.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/compiler-builtins/libm/src/math/rem_pio2_large.rs b/library/compiler-builtins/libm/src/math/rem_pio2_large.rs index 5065ca496b22..841a51b84c27 100644 --- a/library/compiler-builtins/libm/src/math/rem_pio2_large.rs +++ b/library/compiler-builtins/libm/src/math/rem_pio2_large.rs @@ -1,4 +1,6 @@ #![allow(unused_unsafe)] +// FIXME(clippy): the suggested fix is bad but the code as-written could be better +#![allow(clippy::explicit_counter_loop)] /* origin: FreeBSD /usr/src/lib/msun/src/k_rem_pio2.c */ /* * ====================================================