Does not compile on rustc >= 1.92: dependency_on_unit_never_type_fallback is deny-by-default #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Since Rust 1.92 (Dec 2025), the lint
dependency_on_unit_never_type_fallbackis deny-by-default, and the crate no longer builds. On rustc 1.96.0:Same error in
examples/simple_client.rs,examples/test.rsandexamples/populate_redis.rs.Cause
Nothing in the repo enables the lint (no
[lints]table, noRUSTFLAGS) — it comes from the toolchain. The repo is edition 2021, but the lint now fires unconditionally: edition 2024 changes the never-type fallback from()to!, and this code depends on the old behaviour.The trigger is the generic API of (crate rust)
redis0.23 :fn set<K, V, RV: FromRedisValue>(...). Called without annotation from a function returningResult<(), E>, inference falls back toRV = ()— accepted for years, now denied.Fix
The explicit annotations rustc suggests, nothing else: