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::panic warns on any explicit panic!() call in non-test production code. Panics that reach users produce cryptic crash output and bypass the crate's anyhow-based error propagation. This lint enforces that every failure path is either returned as an Err or, when a code path is genuinely unreachable, expressed with unreachable!() — which is semantically precise and excluded from this lint.
Why it improves code quality
This codebase already forbids dbg! and todo! to prevent debug artefacts from shipping. clippy::panic closes the analogous gap for accidental panics:
Explicitness — unreachable!() signals intent (this arm cannot be reached), while panic!() is ambiguous.
Consistency — matches the existing spirit of dbg_macro = "deny" and todo = "deny".
Error hygiene — keeps all error paths routed through anyhow::Result and out of crash-and-burn territory.
Current state
No violations exist in production code. Test files use panic!() in match fallback arms that are genuinely unreachable; those are fixed by replacing them with unreachable!().
This issue was opened by the Clippy lint improvements → issue + PR (Rust repos) → Slack routine of moadim. CC @tupe12334
Activity
github-actions commentedon Jun 26, 2026
A workspace is ready for this issue.
Powered by Worktree · Install