{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreigrbi2t7hss22lntx6czpxkxvewl52xyxu3qljpylv3vp2pxpskiu",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mmkgi2lzxek2"
  },
  "path": "/t/pre-rfc-improved-ergonomics-for/24336#post_14",
  "publishedAt": "2026-05-23T19:37:36.000Z",
  "site": "https://internals.rust-lang.org",
  "textContent": "MusicalNinjaDad:\n\n> so the user is used to adding `unreachable!()` or similar to avoid a compiler error.\n\nThe best way to avoid this error when using `Infallible` is `match _b {}` – you can match against all 0 variants of `Infallible` to avoid the error (which compiles because all 0 match arms produce a value of the correct type). It's possible that this technique isn't sufficiently widely-known, so maybe we'd benefit from Clippy or the like explaining it (but maybe that wouldn't be worth it, given that `Infallible` is due to be replaced by `!`).\n\nI'm not sure what happens if you write the equivalent using `!`. In any case, it would make sense to not lint on a 0-variant match in unreachable code (because the construct in question explicitly serves as a proof that the code is unreachable / marks it as unreachable, so is unlikely to have been a mistake).",
  "title": "Pre-RFC improved ergonomics for `!`"
}