{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreicphpw4d7qjb2p4x44fuvwu375fdkc7bsldqn7k54knyb2ycsmqea",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mjw5f36whm72"
},
"path": "/t/pre-rfc-pub-api-visibility-and-static-enforcement-of-crate-internal-api-boundaries/24184#post_7",
"publishedAt": "2026-04-20T08:00:11.000Z",
"site": "https://internals.rust-lang.org",
"textContent": "kornel:\n\n> `pub(in path)` had to have `in` added because `pub(not_a_keyword)` was ambiguous (in struct definitions? I don't remember the exact syntax quirk).\n\nI _think_ the ambiguity would be nested tuples: `struct TupleStruct(pub (u32, u32), u32)`. Without `in`, you can't easily disambiguate between a type path and a module path.\n\nThis is not too far removed from the ambiguity that made it hard to use `crate` as shorthand for `pub(crate)`: `struct TupleStruct(crate ::type)`.",
"title": "Pre-RFC: `pub(api)` visibility, and static enforcement of crate-internal API boundaries"
}