External Publication
Visit Post

Pre-RFC: `pub(api)` visibility, and static enforcement of crate-internal API boundaries

Rust Internals [Unofficial] April 20, 2026
Source

I thought that, generally, all pub items are suggested to be exported from the containing crate. The text of the unreachable_pub rustc lint docs say:

This lint is “allow” by default because it will trigger for a large amount of existing Rust code. Eventually it is desired for this to become warn-by-default.

I don't see it saying that pub methods are an exception here (at least when it's in warn mode).

Regardless, I can work through that example again, either replacing it or at least mentioning it as another example.

Discussion in the ATmosphere

Loading comments...