fix: suffix f32 literals and deny future-incompatible warnings
Sixteen `Stroke::new(1.0, ...)` calls in the editor relied on a numeric
inference fallback that rustc is removing:
warning: falling back to `f32` as the trait bound `f32: From<f64>` is
not satisfied
= warning: this was previously accepted by the compiler but is being
phased out; it will become a hard error in a future release!
These were never clippy lints - a plain `cargo build` emitted all sixteen
- and they are not style. They are a dated compile break: the code stops
building on whichever release drops the fallback. Applied via `cargo fix`,
since rustc marks the suggestion machine-applicable; the diff is sixteen
literals gaining an `_f32` suffix and nothing else. The values were
already f32, just inferred.
Denying the future_incompatible group makes the next one a build failure
the day it appears rather than something that accumulates unnoticed until
a toolchain bump breaks the build on a day nobody chose. Verified by
reverting one literal: the build then fails with exit 101 instead of
warning.
Pinning rust-toolchain.toml was considered and rejected for this purpose.
It buys reproducibility, but it works against early warning - a pinned
toolchain finds out about the next deferred hard error later, not sooner.
Build warnings drop from 17 to 0. The 15 remaining clippy lints are
genuine style suggestions and are untouched, as is clippy's absence from
CI.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WHt4DykxXaQnyaJfyS8KCn
This commit is contained in:
@@ -17,6 +17,14 @@ members = ["xtask"]
|
||||
# `cdylib` is the plugin binary; `lib` (rlib) lets `cargo test` link the unit tests.
|
||||
crate-type = ["cdylib", "lib"]
|
||||
|
||||
# Future-incompatibility warnings are deferred hard errors: rustc is telling you
|
||||
# this code stops compiling on some later release. Denying the group turns that
|
||||
# into a build failure the day it appears, rather than 16 of them accumulating
|
||||
# unnoticed until a toolchain bump breaks the build on a day you did not choose.
|
||||
# Style and clippy lints are deliberately untouched - they stay warnings.
|
||||
[lints.rust]
|
||||
future_incompatible = { level = "deny", priority = -1 }
|
||||
|
||||
[dependencies]
|
||||
# Pinned to the exact commit of the local ./nih-plug reference clone so the build
|
||||
# is reproducible and matches the examples we read from. Bump the `rev` together
|
||||
|
||||
Reference in New Issue
Block a user