All these guards are bound to be almost always false (obviously).
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
I imagine the compiler might infer this already but I don't think it hurts readability in any significant way, so sure.
Comment Actions
It could (for the regular panic() case, and more generally "noreturn" functions), although there might be cases where the "noreturn" path is actually the most probable, but this is arguably niche and could understandably be ignored by the compiler. Cases where one does not want to actually panic, but just print a diagnostic message and continue, would benefit from this but are likely edge cases. I was not too sure about doing this change, but as you say it doesn't hurt either.