{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreih6gtiqjl4xao6rwqv2mmasnysreopfaq7kkwgrwfmronxyvkifuu",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mgineeusf6v2"
  },
  "path": "/t/idea-pre-rfc-null-free-pointer-and-zeroable-reference/23991?page=5#post_97",
  "publishedAt": "2026-03-07T20:06:49.000Z",
  "site": "https://internals.rust-lang.org",
  "textContent": "I've revised the OP - allowing zero to `&` and `&mut` will never happen. The zeroable reference primitive is NOT replacing the non-zero reference; they coexist.\n\nH4n_uL:\n\n> # Before reading\n>\n> This proposal SHALL NOT change:\n>\n>   * Semantics, layouts, and niche optimisations of `&T`, `Option<&T>`, and `NonNull<T>`\n>   * Validity invariant of non-zero reference primitive - `&T` and `&mut T` (0x0 remains null for them)\n>   * All existing safe and unsafe APIs that do not access 0x0\n>   * ABIs\n>\n\n\nAnyway, your `AnywherePtr<T>` + field projection seems interesting and I think it naturally points toward making it a compiler-known primitive. Once you need lifetime tracking, borrow semantics, and field projection on a pointer type, it becomes difficult to express that purely as a library type without compiler support. At that point, promoting it to a new reference primitive seems like the more natural path.",
  "title": "Idea / Pre-RFC: Null-free pointer and Zeroable reference"
}