Open
Description
I think we should suppress warnings that unreachable!() macros are unreachable. I had some nested logic with early returns and while at the moment it could not get to the end of the function, I could predict that some changes to the logic might miss a branch and then it would get to the end of the function - I wanted to catch that future mistake with an unreaachable!() macro. If we don't warn about unreachable unreachable!'s then I think that will make rust a safer language to code in as we can code more defensively.
warning: unreachable statement
--> src/<snip>.rs:1298:5
|
1190 | return None;
| ----------- any code following this expression is unreachable
...
1298 | unreachable!("Case missed. Should have early returned above.");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement