Closed
Description
What it does
This lint would check for instances of pub(self)
and pub(in self)
and suggest that they be removed.
Advantage
Removes extraneous visibility syntax where it has no effect at all. Per Visibility and Privacy from the Rust Reference:
pub(self)
[...] is equivalent topub(in self)
or not usingpub
at all.
Drawbacks
Some codebases may use pub(self)
or pub(in self)
to denote a item that is meant for use within a submodule, and the lack of such to denote an item meant only for use within the same file.
Example
pub(self) struct State;
Could be written as:
struct State;