unreachable!() in shipped source
Part of Code Quality & Syntax, which counts for 20% of the overall score. When this check fires it deducts 4 points from that category, once per scan, no matter how many places it turns up.
What it detects
unreachable!() left in non-test source panics if the assumed-impossible branch is ever actually reached. Heuristic: unreachable!() is also a common, legitimate way to assert a real invariant (e.g. an exhaustive match), so this is kept low severity rather than treated as a certain bug.
Why it matters
unreachable!() panics if the branch it guards is ever actually reached, which is exactly the intended behavior when it documents a real invariant (an exhaustive match where one arm truly cannot happen given the types involved). The risk is that the same macro is sometimes reached for behind an assumption that turns out to be wrong once the code evolves, and then a "this can never happen" branch becomes a real, confusing production crash.
How to fix it
For each occurrence, confirm the invariant it depends on still holds given the current code, and add or update a comment stating exactly why that branch cannot be reached. If there is any realistic path to reaching it (an enum gains a variant, an external input can violate the assumption), replace it with a real error return instead of a panic.
The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing
Does your repo trip this check?
Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.
Scan your repo