{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreicz4gdh57xaitabzjuto5hnfpfum54bumihkrzcscjxrwdh2gmujm",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3me5bdq5crwy2"
  },
  "path": "/t/private-unsafe-fields-are-a-poorly-motivated-feature/23976#post_9",
  "publishedAt": "2026-02-05T20:20:58.000Z",
  "site": "https://internals.rust-lang.org",
  "textContent": "tczajka:\n\n> Or should `val` be an `unsafe` field here, even though the module doesn't use it for memory safety?\n\nAs author of the module, you choose the safety invariant of the type. If \"not zero\" is part of the safety invariant, then the field should be unsafe. If it is just a \"logic invariant\" (like `Ord` contract), then it should not.",
  "title": "Private unsafe fields are a poorly motivated feature"
}