Skip to main content

Module classify

Module classify 

Source
Expand description

Classify each top-level item: keep it in the parent, or move it to a child module file (with the visibility rewrites + re-export needed to preserve the API).

§Why we widen visibility

Moving an item from module M into M::child changes which modules are descendants of the item’s defining module. A private field/method is visible to M and all of M’s descendants; after the move it is only visible to M::child’s subtree, so sibling modules that relied on the old nesting break.

Widening such members to pub(crate) is a superset of any in-crate audience they previously had, so it can never break code that used to compile, and it does not change the external API (the item’s name is re-exported at its original visibility, and pub(crate) members remain invisible outside the crate).

Structs§

AbsVisEdit
A visibility edit in absolute source coordinates. A zero-width range is an insertion.
MoveInfo

Enums§

ItemClass
Result of classifying one item.

Functions§

classify