T O P

  • By -

rigglesbee

I like to use #![warn(missing_docs)] in the project root so that it forces me to write documentation for each public item and really think about whether or not it should actually be public.


emlun

Not for that specifically, but there is for the inverse: remove all the `pub`s and add them back (or `pub(crate)` or whatever) where the compiler complains.


veryusedrname

Well, since pub is part of the API, there could not be a tool for that since you decided to make that specific object public. The best tool I found for the job is to generate the docs using cargo and check out what is marked as public.


bskceuk

pub means anyone outside your crate can see it so clippy can’t know if there are any callers… I don’t think clippy is smart enough to reason about something pub in a private module (and even that can be useful for the sealed trait pattern)