Rust: [rustdoc] When calculating docs percentage, ignore items marked `allow(missing_docs)`

Created on 30 Aug 2020  路  4Comments  路  Source: rust-lang/rust

Request

The --show-coverage unstable option should not count items marked as allow(missing_docs) when calculating the docs percentage.

Use Case

I have a crate full of "bitfield" types, where the useful data is bit packed into integers (example). Each pseudo-field has a getter and a setter. I would like to document the getters, but the setters simply match the associated getter, and additional words on them would only serve to distract.

Accordingly, the getters are marked as allow(missing_docs), and they shouldn't count towards the docs coverage.

A-doc-coverage C-feature-request E-easy E-mentor T-rustdoc

All 4 comments

It's not only should_have_docs: it shouldn't be counted as an item either.

@jyn514 / @Lokathor could I take a look at this one, please?

Go ahead.

Was this page helpful?
0 / 5 - 0 ratings