{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreighz6h7wb7qd73m6rqxgsefwj424l4yxyexrm56xeqiqz2givgbm4",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mlynm5ztots2"
},
"path": "/t/reducing-raw-pointer-footguns-preventing-reference-aliasing-violations-at-compile-time/24301#post_18",
"publishedAt": "2026-05-16T07:51:42.000Z",
"site": "https://internals.rust-lang.org",
"textContent": "The point of the example is not the specific body of the code itself. The raw pointer operation is only a simulation of real world code or low level operations that fundamentally require raw pointers and can not be changed into references. Eg FFI calls, low level code, intrusive data structures, 3rd party libs that take raw pointers\n\nIt is demonstrating how fragile the aliasing violation becomes once raw pointers and references start interacting. A tiny ordering mistake silently become UB without any compile time error",
"title": "Reducing Raw Pointer Footguns: Preventing Reference Aliasing Violations at Compile Time"
}