Any way to pin clippy version but upgrade rest of toolchain?
⚓ Rust 📅 2025-09-18 👤 surdeus 👁️ 11I understand that clippy and rustc are inextricably linked so I imagine the answer to my question is probably "no", but is there any way to pin to a particular version of clippy and upgrade the entire toolchain?
We currently run our PR and CI pipelines on our MSRV, latest stable, and latest nightly. But the problem with the last two is that, often times, clippy adds new stylistic lints that now only start "randomly" breaking our builds (today, 1.90 just came out so our "latest" changed) and, in this case, it's a new lint and we're a workspace of lib crates, so we have to add something like:
#[allow(unknown_lints, clippy::manual_is_multiple_of)]
And I call clippy::manual_is_multiple_of "stylistic" because there's nothing wrong with doing it manually. Seems several new lints in the past couple releases have been this way: a method is added to simplify(?) code but doesn't obviate the old code. But these lints aren't categorized in clippy::style so we can't just blanket ignore them in our workspace Cargo.toml. Every month when a new toolchain comes out, we inevitably have to create a one-off PR to fix new lints that, most often, aren't actually a problem.
4 posts - 4 participants
🏷️ Rust_feed