{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiceowh56tscaejcx2vf2rlhkg6wdara4g6a26eytwlx6ijgnv53lq",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mn5rfo4sghd2"
  },
  "path": "/t/include-racy-reads-in-rust-memory-model-with-maybeinvalid-t/24289?page=2#post_34",
  "publishedAt": "2026-05-31T14:08:38.000Z",
  "site": "https://internals.rust-lang.org",
  "textContent": "RalfJung:\n\n> The story cannot depend on a check that has not happened yet.\n\n[citation needed]\n\nIt's the story which tell _ourselves_ , not to the compiler. The assembly block reads _some_ value which we _know_ can be interpreted as `T` if the validity check has passed. We communicate it to the compiler by calling `assume_init` only after the check. Until then the value is completely opaque to the compiler, so the Schrodinger-like reliance on the post-factum check in our story is fine.\n\nSuch reasoning may not fit into the reductionist \"tell me story in terms of AM\" approach, but it's used in practice and by the looks of it works more or less reliably.",
  "title": "Include racy reads in Rust memory model with `MaybeInvalid<T>`"
}