Missing_docs on private fields

Is there a way to enforce missing_docs lints on private fields as well as on public ones?

1 Like

Looking at the source, it doesn’t seem like that’s possible:

// Only check publicly-visible items, using the result from the privacy pass.
// It's an option so the crate root can also use this function (it doesn't
// have a NodeId).
if let Some(id) = id {
    if !cx.access_levels.is_exported(id) {

The one thing I’m not sure about is whether cargo doc --document-private-items interacts with the privacy pass in any kind of special way - does enabling that option give you the results you’re after? If not, I don’t think it’s possible right now.

1 Like