{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreias2a6lvcpi2oock5p7bwvcbpyawitam2c5i2v54oprr4tgzuzukq",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mmu77genm632"
},
"path": "/t/pre-rfc-guarantee-that-pointers-to-osstr-has-the-same-layout-as-pointers-to-str-u8/24354#post_6",
"publishedAt": "2026-05-27T18:19:17.000Z",
"site": "https://internals.rust-lang.org",
"tags": [
"Allow limited access to `OsStr` bytes by epage · Pull Request #109698 · rust-lang/rust · GitHub"
],
"textContent": "I had a PR up for specifying that `transmute` was valid between `&OsStr` and `&[u8]` and libs-api, at the time, decided to instead make this done through explicit functions. See Allow limited access to `OsStr` bytes by epage · Pull Request #109698 · rust-lang/rust · GitHub",
"title": "Pre-RFC: Guarantee that pointers to `OsStr` has the same layout as pointers to `str`/`[u8]`"
}