{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreiatwho3gzawqnwqxw72gdfikefhb5ecyscvcsfd2uvufqvkkhh3n4",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mmkghlnurlk2"
},
"path": "/t/another-experiment-to-make-unsafe-rust-safer-preventing-ub-in-maybeuninit-with-compile-time-error/24352#post_15",
"publishedAt": "2026-05-23T20:11:53.000Z",
"site": "https://internals.rust-lang.org",
"textContent": "fuji-184:\n\n> That is not true without we build that abstraction for MaybeUninit first, because different types + MaybeUninit or Option + MaybeUninit doesn't magically prevent MaybeUninit footguns without building the right abstraction.\n\nYes, I am not suggesting that you should put `MaybeUninit` inside an `Option`; I am saying that `Option<T>` _is the replacement for_ `MaybeUninit<T>` for cases where a single runtime flag is sufficient.\n\nIn general, things that improve on `MaybeUninit` _don't mention_ `MaybeUninit` or have \"uninit\" on the name, because `MaybeUninit` is the last resort.",
"title": "Another Experiment To Make Unsafe Rust Safer: Preventing UB In MaybeUninit With Compile Time Error"
}