{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreiajuensnyfkggbnxche2raaimwddam7xyupqej66f4oyjjyp5ipp4",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mfppsh2mipk2"
},
"path": "/t/re-opening-deprecating-option-unwrap-and-result-unwrap/23734?page=7#post_123",
"publishedAt": "2026-02-25T21:38:45.000Z",
"site": "https://internals.rust-lang.org",
"tags": [
"[1]",
"↩︎"
],
"textContent": "FWIW, without providing the error value, there's not much difference[1] between that and\n\n\n let Ok(f) = foo() else { panic!(\"nice message {}\", \"with formatting\") };\n\n\nbut yes, a postfix `.unwrap!` would be a very nice convenience. There are just _many_ issues with type-dependent macro name lookup that make this an unlikely feature. (`.unwrap!` could potentially be non-type-dependent by being generic over `Try` semantics, but `.assert_ok!` wouldn't want to be a global name that only accepts `Result` receivers. You could _maybe_ argue justifying it from the fact that `Ok` is already in the prelude, but that's a rather weak justification.)\n\n* * *\n\n 1. At least, if we stray from rustfmt's default style, which always makes the `else` block an indented block. ↩︎\n\n\n",
"title": "Re-opening deprecating Option::unwrap and Result::unwrap"
}