{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreiagcqfi3ooyyxahqkvmefi3kxacf2opuaguxvcjrg7ungqay7ztde",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mmjtmfmdzl62"
},
"path": "/t/another-experiment-to-make-unsafe-rust-safer-preventing-ub-in-maybeuninit-with-compile-time-error/24352#post_11",
"publishedAt": "2026-05-23T15:42:47.000Z",
"site": "https://internals.rust-lang.org",
"textContent": "I think arrayvec is more high level\n\nMy goal is a lossless safer abstraction of maybeuninit. So that it can still be used as building block to create data structure or low level programming\n\nBut now I'm confused to choose compile time error, zero branching, but 2 different type because it is what causes the compile time error so no branching is needed. Or 1 type but using runtime branching\n\n1 type with optional written len for array. Or dedicated type for array with name UninitArray (MaybeUninit<[ array ]>). That will have method to get slice from it as long as it is < the written len, no need to wait it to be fully written",
"title": "Another Experiment To Make Unsafe Rust Safer: Preventing UB In MaybeUninit With Compile Time Error"
}