The --show-coverage unstable option should not count items marked as allow(missing_docs) when calculating the docs percentage.
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.
Mentoring instructions: Add a new argument should_have_docs: bool to fn count_item: https://github.com/rust-lang/rust/blob/dadde88ebacd5e209922928206e0d85a99009203/src/librustdoc/passes/calculate_doc_coverage.rs#L39
Then pass in whether the item has allow(missing_docs), which can be found from attrs: https://github.com/rust-lang/rust/blob/dadde88ebacd5e209922928206e0d85a99009203/src/librustdoc/passes/calculate_doc_coverage.rs#L231
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.