{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreiaj47gp3lj7s3oa5twdtmzhb6zyma2diygt5dsixmchbynzhuxjmu",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mgjoxpgrz2n2"
},
"path": "/t/idea-pre-rfc-null-free-pointer-and-zeroable-reference/23991?page=5#post_100",
"publishedAt": "2026-03-07T20:34:39.000Z",
"site": "https://internals.rust-lang.org",
"tags": [
"Tracking Issue for Field Projections · Issue #145383 · rust-lang/rust · GitHub",
"Tracking Issue for Reborrow trait lang experiment · Issue #145612 · rust-lang/rust · GitHub",
"playground"
],
"textContent": "H4n_uL:\n\n> it becomes difficult to express that purely as a library type without compiler support.\n\nLifetime tracking and borrow support is already available to custom types, with the exception of re-borrowing.\n\nThere are many other types, both in the standard library and in third-party crates that would benefit from field projection and/or reborrow support. So it's better to add those features in the compiler, and make your reference type an ordinary library type.\n\nFor field projections the tracking issue is Tracking Issue for Field Projections · Issue #145383 · rust-lang/rust · GitHub\n\nFor re-borrowing the tracking issue is Tracking Issue for Reborrow trait lang experiment · Issue #145612 · rust-lang/rust · GitHub\n\n* * *\n\nBoth of these features can effectively be used with custom types today, just with some downsides, like ugly syntax, and lack of type inference.\n\nFor example field projection, might currently look something like `field!(pointer, fieldname)` instead of `pointer~fieldname`. playground\n\nAnd reborrowing might require something like `pointer.reborrow()` instead of happening automatically.",
"title": "Idea / Pre-RFC: Null-free pointer and Zeroable reference"
}