racer icon indicating copy to clipboard operation
racer copied to clipboard

Hide items that are #[doc(hidden)]

Open bluss opened this issue 9 years ago • 2 comments

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.

bluss avatar Jan 25 '16 23:01 bluss

Would you want this only when crossing crates, or also within the defining crate?

TedDriggs avatar Jun 06 '17 17:06 TedDriggs

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.

ghost avatar May 17 '18 09:05 ghost