{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreih3glurypemb7enftjvmneljep2kq26jfo4eq3dyec5cxwsjlkehi",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mifbbsw4hay2"
},
"path": "/t/on-replacing-unsafecell/24113#post_5",
"publishedAt": "2026-03-31T11:43:19.000Z",
"site": "https://internals.rust-lang.org",
"textContent": "ProgramCrafter:\n\n> I continue to hold that `UnsafeCell<T>` is some strange \"type\" because it doesn't do anything in its owned form, and is rather pointless to pass through function boundaries in any form.\n\nIt does something in its shared form though. Types in Rust have two faces that are both equally relevant. It seems odd to me to discard a type just because it is transparent for one of those two faces, when it is clearly very relevant for the other face.\n\nAlso FWIW every time we did this with attributes it was a mistake. In particular `#[packed]` is a terrible hack and was unsound for many years. Generally this kind of semantic change is much easier to get right in the language, and much easier to communicate to users, when it is done with types rather than attributes.",
"title": "On replacing UnsafeCell"
}