External Publication
Visit Post

Pre-RFC improved ergonomics for `!`

Rust Internals [Unofficial] May 26, 2026
Source

MusicalNinjaDad:

But doing it in unreachable code does. (I just fixed the link to the second playground in my post above and tried it.)

I've repeatedly found this rather annoying. I'd like to write some explicit syntax which proves "I have an impossible value here, discard this branch"; having that syntax itself be linted against defeats the purpose. I think ideally we should have something more explicit than match val {}; I could imagine a macro or std function such as provably_unreachable or exfalso or so. But the most important part is that we can write it without the lint getting in the way.

Discussion in the ATmosphere

Loading comments...