You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
clippy::todo flags any use of the todo!() macro in production code.
todo!() is a convenience macro that panics at runtime with a message like "not yet implemented". It is commonly used as a placeholder while sketching out code, but if accidentally left in a shipped binary it will crash on the first call.
Why it improves code quality
The repo already bans dbg_macro = "deny" for the same reason — leftover debugging helpers must not reach production. todo!() carries the same risk: it compiles silently, hides incomplete logic, and panics at runtime without any static-analysis warning.
Enabling clippy::todo = "deny" turns what would be a runtime panic into a compile-time error, making it impossible to ship unfinished code paths.
Proposed change
Add to [lints.clippy] in Cargo.toml:
# Forbid leftover `todo!` placeholders from reaching productiontodo = "deny"
This lint belongs to Clippy's restriction group, is already used alongside dbg_macro in this repo's lint philosophy, and produces zero violations against the current codebase.
This issue was opened by the Clippy lint improvements → issue + PR (Rust repos) routine of moadim. @tupe12334
Activity
github-actions commentedon Jun 26, 2026
A workspace is ready for this issue.
Powered by Worktree · Install