racer
racer copied to clipboard
Hide items that are #[doc(hidden)]
Common #[doc(hidden)] items are: function/trait/const/anything that is technically public but not intended to be used.
An enum variant can also be hidden to simulate an "open enum", where the enum cannot be matched exhaustively, and thus will add new variants backwards compatibly. One example is ::std::io::ErrorKind::__Nonexhaustive.
Would you want this only when crossing crates, or also within the defining crate?
I'd like this when crossing crates, too. Anything that is marked with #[doc(hidden)] is public only as a workaround but is really meant to be private.
In crossbeam-channel I'm exposing all the internal modules as public and marked with #[doc(hidden)]. The reason why almost everything has to be public is because the internal (meant to be private) modules are used by the public select! macro.