Description
Hi, I just tried to use the unreachable_pub
lint in a medium-sized project and IMO, it's rather noisy about fields and methods, which, to me, are much less important targets to this lint than types. The reason I want to use the lint is (1) to make sure I don't forget to re-export types from modules that aren't supposed to be public, and (2) to make it more obvious at declaration site whether something is part of the public API.
(1) doesn't apply to fields and methods at all, and (2) matters much less for them as opposed to types, since it's generally already easy enough to tell when they're not part of the public API because they are part of a type that isn't.
Because of that, it would be great if I could enable this lint for types only, and not have to change all the pub
fields and methods in pub(crate)
types to also have pub(crate)
visibility. For fields in particular this just feels like line noise.
@rustbot label +A-lint +A-visibility